[Lazarus] GTK2 GroupBox auto size

Henry Vermaak henry.vermaak at gmail.com
Fri Jul 4 14:21:02 CEST 2014


On Fri, Jul 04, 2014 at 01:03:56PM +0100, Henry Vermaak wrote:
> On Fri, Jul 04, 2014 at 12:39:12PM +0100, Henry Vermaak wrote:
> > 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.
> 
> http://bugs.freepascal.org/view.php?id=20447

Same happens on Windows.  There isn't even a GetPreferredSize() member,
so that probably needs to be added containing MeasureText() and some
code to calculate border widths.  I don't really know how the win32
widgetset works, though.

Henry




More information about the Lazarus mailing list