[Lazarus] Anchoring problem with ScrollBox and Panels

Gabor Boros mlnglsts at bgss.hu
Wed Jun 7 07:45:00 CEST 2017


2017. 06. 06. 19:54 keltezéssel, Michael W. Vogel via Lazarus írta:
> I can tell you here the same as in the related bug report 
> https://bugs.freepascal.org/view.php?id=30617, this isn't a bug it is 
> not happy design. You want that the scrollbox height is increased, but 
> then the Panel2 height is increased too. Simple remove anchored bottom 
> of Panel2 and the loop is gone.
You wrote on the tracker:

"You have anchored Panel2.Bottom to no sibling and Panel3.Top to 
Panel2.Bottom. When you now change the height of Panel3, that it doesn't 
fit in the scrollbox anymore, the scrollbox is resized. With resizing of 
the scrollbox, Panel2 is also resized (because its Bottom is anchored). 
Now Panel3.Top is moved too and Panel3 doesn't fit in the scrollbox 
anymore. And repeat."

I understand you(r description) except one thing. "Panel2 is also 
resized (because its Bottom is anchored)" Why you think Panel2 is 
resized? When height of Panel3 increased and the vertical scrollbox 
showed up, height of scrollbox not changed nor top of Panel3.

Attached two pictures. One before resized Panel3 and one after (pressed 
Continue on the loop error message). You see top, bottom and height of 
Panel1 and Panel2 is same as before.

So top, bottom, height of Panel1, Panel2 and ScrollBox1 not changed. Why 
got the loop error? Only height of Panel3 changed. Width of Panel1,2,3 
changed, okay but why this block the work of vertical anchoring?

Gabor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: before_Panel3_resize.png
Type: image/png
Size: 12347 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170607/36cfa0e2/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: after_Panel3_resize.png
Type: image/png
Size: 14299 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170607/36cfa0e2/attachment-0003.png>


More information about the Lazarus mailing list