[Lazarus] GroupBox AutoSize issues

Henry Vermaak henry.vermaak at gmail.com
Tue Mar 17 18:05:30 CET 2015


On Tue, Mar 17, 2015 at 05:46:01PM +0100, Mattias Gaertner wrote:
> On Tue, 17 Mar 2015 16:12:30 +0000
> Henry Vermaak <henry.vermaak at gmail.com> wrote:
> 
> > Hi
> > 
> > A while ago we managed to fix the GroupBox auto sizing not taking the
> > length of the caption into account.  I've been using the fixes_1_2
> > branch and that's working OK.
> > 
> > I switched to fixes_1_4 and started seeing some strange behaviour.
> > Initially it appears that the auto sizing works correctly (see
> > groupbox1.png) but when you resize the window it changes and cuts the
> > caption off (see groupbox2.png).  It doesn't resize again after that.
> > This only happens when you've got some anchors set.
> > 
> > Does anyone know what could have caused this?  If not I'll have to
> > bisect, which I'd rather avoid!
> 
> The LCL gtk2 interface computed the preferred size of a groupbox
> including the child controls, which lead to a loop.
> We need another way to compute the size of a groupbox without the child
> controls.

I don't understand, how can you know the size of the groupbox if you
don't know the size of the children?  How does, e.g., a panel do this?
Sorry if this is a stupid question, the auto size mechanics confuse me a
bit.

Henry




More information about the Lazarus mailing list