[Lazarus] csOpaque seems to be broken in 0.9.29
Mattias Gärtner
nc-gaertnma at netcologne.de
Tue Dec 22 16:55:03 CET 2009
Zitat von Graeme Geldenhuys <graemeg.lists at gmail.com>:
> Mattias Gärtner wrote:
>>
>> csOpaque:
>> - the control is treated as transparent
>> - but it does not make a control transparent
>
> This makes no sense. :-) It's told to be transparent but isn't really
> transparent because it still paints the background with clBtnFace.
I will try again with other words:
Let's assume you create a non rectangular control. Then you must tell
this the LCL by removing csOpaque. Normally when the user clicks with
the mouse on a pixel inside the rectangular area of a control the LCL
will send the mouse event to this control. Without csOpaque it must
change this check.
Same when clipping child controls.
Removing csOpaque is not enough. You must override several methods to
give this sense. For example not erasing the whole background and
hittest.
There are many meanings of "transparent". But there is only one
meaning of csOpaque. I guess, that's why Delphi called it this way.
> csOpaque is then probably not the best chosen name for what LCL uses it for.
AFAIK it is delphi compatible.
>> get limited transparency. The easiest is to just paint the parent
>> background.
>
> True, and this is what I do in fpGUI too.
Mattias
More information about the Lazarus
mailing list