resizable toolbar lazarus / 21-General ---------------------------------------------------------------------- Paolo · 2021-08-13 10:25 Hello, yesterday I went crazy with a toolbar in one application of mine. It refuses to split on several rows when the main form is resized, either at design time or at run time. Then I solved the problem. Here attached the code to reprodce the situation. I wrote here because I suspect it is a bug. essentially open project and resize the main form width (design or run time), you will se the toolbar splits itself on two rows, but reducing more the form width nothing happened. To restore the right behaviour I need to go to in the field "HorzScrollBar" of main form and reduce the fields Page and Range, by doing so the toolbar splits on more rows. Note that "AutoScroll" it is disabled in the main form. Is this a right behaviour ? It seems to me that the first time you set the AustoScroll to true it enlarges the main form and when it is disabled it forgot to restore the inital situation, to discover this I spent a halfday beacuse I do not understand way my right side with toolbar does not resize coerrectly both at design at run time. win 10 64bit, laz 2.0.12, fpc 3.2.0 ---------------------------------------------------------------------- wp · 2021-08-13 13:32 In your demo, the HorizScrollbar.Page and, in particular, Range are modified to the value 627. This means that when the form width becomes smaller the internal form width stays fixed at 627 and a horizontal scrollbar is provided to allow to scroll to the hidden parts of the smaller viewport. Add an event handler to Panel2.OnResize displaying the form width in the form caption. Then set AutoScrollbar to true. Run and decrease the form width. At the very moment when the horizontal toolbar is shown the caption title displays the form width of 627. From this moment on the toolbar does no longer decrease in width and the buttons stop wrapping. Solution: Just reset the HorizScrollbar.Range to 0, and the tool buttons (and inserted controls) will wrap at any form width. ---------------------------------------------------------------------- Paolo · 2021-08-13 16:25 @wp thanks. In my application very likely I set AutoScroll to true and this caused the Page and Range to be set to some value. Then setting back autoscroll to false I was supposing that such values were ignored.