[Lazarus] GTK2 GroupBox auto size

Vojtěch Čihák vojtech.cihak at atlas.cz
Fri Jul 4 15:13:19 CEST 2014


Hi,
 
Delphi has no TGroupBox.Autosize but it has TPanel.AutoSize.
When I put children on Panel, set very long Panel.Caption and Panel.AutoSize:=True then panel shrinks to the smallest possible size (around children) ignoring its own Caption.
So it seems more a feature than a bug to me.
 
Vojtěch 
______________________________________________________________
> Od: Henry Vermaak <henry.vermaak at gmail.com>
> Komu: Lazarus mailing list <lazarus at lists.lazarus.freepascal.org>
> Datum: 04.07.2014 13:40
> Předmět: [Lazarus] GTK2 GroupBox auto size
>
Hi

The GroupBox auto size doesn't work very well, because it doesn't take
the label width into account.  If the label is wider than all of the
children, it will get clipped.  Any reason why GetGTKDefaultWidgetSize
wasn't used, like virtually everywhere else in gtk2wsstdctrls.pp?

I attach a patch that uses GetGTKDefaultWidgetSize.

Henry


----------

--
_______________________________________________
Lazarus mailing list
Lazarus at lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus <http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20140704/7b18550e/attachment-0003.html>


More information about the Lazarus mailing list