[Lazarus] TPanel bevel and client size

cobines cobines at gmail.com
Fri Feb 12 09:30:42 CET 2010


2010/2/12 Paul Ishenin <ip at kmiac.ru>:
> 12.02.2010 14:33, cobines wrote:
>
>> If I set any of the bevels instead, the control's ClientSize remains
>> the same as Size. I would expect the bevels be treated like borders
>> and also reduce client size. Or is this how it's supposed to work?
>
> Bevels reduce ClientRect by BevelSize value.

I thought so that they're supposed to do that, but if I put a TPanel
on a form with a outer bevel set to Lowered , the panel's ClientHeight
= Height.

>
>> Problem arises when using autosize on TPanel. The bevels are not
>> accounted for when size is calculated, the panel's size is the same as
>
> BevelSize is used to calculate the ClientRect in
> TCustomPanel.AdjustClientRect.

Yes, that function recalculates the rectangle correctly, but it seems
it's somehow not propagated to the auto size algorithm or to the
stored client rectangle.

>
>> Is this a bug?
>
> If it does not work then yes.

I'll post it to Mantis. Still don't know if it's LCL issue or
widgetsets, but I observed it on LCLGTK2 and LCLQT so far.

--
cobines




More information about the Lazarus mailing list