[Lazarus] GTK2 EraseBackgound

JoshyFun joshyfun at gmail.com
Sun Feb 7 14:24:54 CET 2010


Hello Lazarus-List,

Sunday, February 7, 2010, 8:41:37 AM, you wrote:

>> I think a deeper change in GTK is needed to handle this situation,
>> maybe all controls must be APP_PAINTABLE and call some methods to
>> perform the operations, but I'm not completly sure that it could be
>> done in fact in GTK (following this logic).
z> No, same thing is with qt. APP_PAINTABLE = HasPaint with qt lcl.
z> This is how it goes:
z> 1.Paint event comes to control.
z> 2.If APP_PAINTABLE then LCL can do the job (usually forms,panels etc)
z> 3.If not - ws paints control with current theme (always after your changes -
z> so any of your changes via painting over such control are lost).
z> So whatever you do in paint event over TEdit, it's painted again by ws.
z> 4.The trick which can be done 1st call control paint from ws, do your changes
z> and say that result of event = true.
z> In that case we must have the way to tell ws that we want to paint that
z> control (eg. TEdit).

Well the background border can be "personalized" which is painted by
the theme engine, I think, but the inner text rect is always erased,
so the problem seems to not be the theme engine (I have a nice textbox
without any kind of border).

-- 
Best regards,
 JoshyFun





More information about the Lazarus mailing list