Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top