I am trying to make a textbox with a watermark text on winforms. I have created a custom textbox (inherited from TextBox
) and am Painting the watermark.
The problem is that the text inside the textbox gets white (disappears) as soon as I enter the textbox with my mouse.
I think it is because the textbox gets invalidated when the mouse enters the region without calling the paint method.
Any ideas how to fix this behaviour?
Thanks!