[Lazarus] csOpaque seems to be broken in 0.9.29

Mattias Gärtner nc-gaertnma at netcologne.de
Tue Dec 22 18:08:52 CET 2009


Zitat von Zaher Dirkey <parmaja at gmail.com>:

> 2009/12/22 Mattias Gärtner <nc-gaertnma at netcologne.de>:
>> 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.
>
> You need a new control TLayout derived from TGraphicControl but have
> new component state csSomthing to bypass mouse action at runtime and
> leave it other controls, but the real problem it must have child
> controls and that need hard coding make many new bugs.
>
> http://www.lazarus.freepascal.org/index.php/topic,4820.0.html

The stuff there is somewhat outdated.
TWincontrols and TControls are not separated anymore.
You can write your own layout manager, but at the moment it is  
somewhat awkward. When the new auto size stuff is finished writing  
layout managers will be easier. Maybe we can even put the default  
layout code to another unit, saving 1-2% of exe size.

Mattias





More information about the Lazarus mailing list