[Lazarus] Drawing over LCL controls

zeljko zeljko at holobit.net
Fri Oct 5 18:59:42 CEST 2012

On Friday 05 of October 2012 18:49:26 Krzysztof wrote:
> I want draw hint text over edit like "search" which disappear when
> control get focus. I have already done it by changing text in DoEnter
> and DoExit methods (like in lazarus control TTreeFilterEdit), but I'm
> just curious if it is possible do the same thing by drawing text

No, widgetsets does not allow painting over TEdit control. Maybe you can use 
customdrawn TCDEdit for that purpose, also there are solutions with TEdit 
which can help you. OnChange of tedit set gray color of text and set text to 
search when it's really empty, when user starts to type then remove "search" 
completely and change text color to clDefault or whatever.


More information about the Lazarus mailing list