[fxruby-users] Toolbar question

Jeroen van der Zijp jeroen at fox-toolkit.org
Fri Oct 28 00:14:49 EDT 2005

On Thursday 27 October 2005 16:02, Riccardo Giannitrapani wrote:
> Hi everyone
> here I'm with a small question on FXToolBar that I hope is not another faq  
> one (I've tried to search around, but with not so much effort I have to  
> admit) .. I'm migrating my application to FXRuby 1.2 to the new 1.4 and  
> wow, I'm so happy till now .. the only problem I've found is the following  
> one that maybe depend on my wrong usage of the new toolbar classes .. in  
> the previous version I remember that when a window was resized in such a  
> way that the buttons in a toolbar were too many to fit the window width,  
> they were automatically moved in more than one row .. now it seems I am  
> not able to reproduce that behaviour .. when I resize my window and the  
> toolbar is larger than the window width, the most right buttons just  
> disappear outside the window frame .. is this a new intended behaviour? Or  
> maybe I'm doing something wrong?
> Thanks so much for the help, Riccardo :)

Since 1.4, there is a new toolbar docking algorithm.  The toolbars are no
longer directly children of FXTopWindow, but of a FXDockSite which is itself
a direct child of FXTopWindow.

The upshot of this new arrangement is that the wrapping algorithm [which needs
a known width or height], is now done in FXDockSite rather than FXToolBar.

In other words, the icons in the toolbar don't wrap, but if you have a bunch
of toolbars side by side, they would wrap based on the FXDockSite's dimensions.

My advice is to use smaller toolbars; you can park them side by side at first,
but if the window is made smaller they'll wrap and occupy two lines in the
dock site.

I'm not convinced yet that the wrapping behaviour as we used to have it in
FXToolBar is impossible, but it has become a non-trivial due to coupling 
between side-by-side toolbars.

			- Jeroen

| Copyright (C) 23:00 10/27/2005 Jeroen van der Zijp.   All Rights Reserved. |

More information about the fxruby-users mailing list