[Lazarus] GTK2 EraseBackgound
Martin
lazarus at mfriebe.de
Fri Feb 5 14:47:20 CET 2010
On 05/02/2010 12:57, JoshyFun wrote:
> Hello Lazarus-List,
>
> I wrote a little text induction feature to TCustomEdit, is is being
> done using LCL in Windows platform (without using Windows unit) where
> it works fine. The induction is the grayed text that appears in some
> textboxes like the attached one (taken from my windows code).
>
> To work in Windows it overrides the EraseBackground to paint the
> induction and the WMPaint message to not paint anything if no text
> available in the textbox.
>
why don't you override/change RealSetText (called by SetText).
If it's empty, supply the special text (and change the color). if it
isn't empty, change the color back (only if it was changed; if the text
was empty before)
Martin
More information about the Lazarus
mailing list