Pergunta

I am designing a search text box, with close button at the end(will be shown when TextLength > 0). But when entering lengthy text, the close button hide the last part of text. I need to restrict the text to not cross the close button.

Note: I dont wont to restrict the MaxLength of characters, but the max length of characters to be displayed inside the textbox.

Foi útil?

Solução

It appears that the close button is overlapping the search text box.

If you are using MFC, then you can use CEdit::SetRect to set the formatting rectangle of edit text. If not MFC, then use EM_SETRECT message to do the same.

I have done similar stuff in my article here: http://www.codeproject.com/Articles/15043/iTunes-like-Find-Edit-Control

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top