[Lazarus] GTK2 EraseBackgound

JoshyFun joshyfun at gmail.com
Fri Feb 5 15:30:02 CET 2010


Hello Lazarus-List,

Friday, February 5, 2010, 2:47:20 PM, you wrote:

M> why don't you override/change RealSetText (called by SetText).
M> If it's empty, supply the special text (and change the color). if it
M> isn't empty, change the color back (only if it was changed; if the text
M> was empty before)

Because in that case you are "fooling" the text content and prone to
errors because the control must handle every possible way to get the
text content including windows messages from other applications and
maybe other unknown modes from GTK2 or other widgetset. This code
should alter the way a information is presented, not the information
itself to avoid incompatibilities.

That was my first approach but I discard it due changing internal
data.

-- 
Best regards,
 JoshyFun





More information about the Lazarus mailing list