How do I implement a TextBox that displays "Type here"?

Posted by mafutrct on Stack Overflow See other posts from Stack Overflow or by mafutrct
Published on 2010-03-21T12:50:43Z Indexed on 2010/03/21 13:01 UTC
Read the original article Hit count: 299

Filed under:
|
|

Displaying "Type here to ..." until the user enters text into a TextBox is a well-known usability feature nowadays. How would one implement this feature in C#?

My idea is to override OnTextChanged, but the logic to handle the changes of Text from and to "Type here" is a bit tricky...

Displaying "Type here" on initialization and removing it on first input is easy, but I want to display the message every time the entered text becomes empty.

© Stack Overflow or respective owner

Related posts about c#

Related posts about textbox