I've built a frame with a toolbar (using frame.CreateToolBar()). After
adding some toolbuttons to it everything looks nice. But when the frame
get's resized (getting smaller) the toolbar get's cut off at the right
end. Is there a way to show an arrow-button opening a popup-menu
containig all those tools which are not visible (due to less space) ?
Another problem wrt ToolBar: The wx.Frame containing the ToolBar uses
sizers to do the layout management. If all the children use less space
then the ToolBar the toolbar also get's cut off (as explained above).
Is there a way to take the size of the toolbar into account by
frame.Fit()?
Or do I have to fetch the toolbar.GetSize() and set it as size hint for
the frame ? OTOH this would mean I cannot resize the frame smaller than
the toolbar (whicht migth be odd as well).
Thanks in advance,
Johannes
···
--
BYTEWISE Software GmbH Tel +43 (5577) 89877-0
i.A. Johannes Vetter Fax +43 (5577) 89877-66
A-6890 Lustenau, Enga 2 http://www.bytewise.at
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Individuelle Datenbanklösungen für GNU/Linux, Windows und
Mac OSX: http://www.bytewise.at/leistungen/gnue-indiv.html
I've built a frame with a toolbar (using frame.CreateToolBar()). After
adding some toolbuttons to it everything looks nice. But when the frame
get's resized (getting smaller) the toolbar get's cut off at the right
end. Is there a way to show an arrow-button opening a popup-menu
containig all those tools which are not visible (due to less space) ?
This is not possible with wx.ToolBar, as far as I know. But if you
really need this functionality, you may want to look at FlatMenu:
It has this option and much more. However, it is an owner-drawn
MenuBar/ToolBar, so it may not suit your needs.
Another problem wrt ToolBar: The wx.Frame containing the ToolBar uses
sizers to do the layout management. If all the children use less space
then the ToolBar the toolbar also get's cut off (as explained above).
Is there a way to take the size of the toolbar into account by
frame.Fit()?
Uhm, that seems strange... have you tried with this layout:
Frame => Panel => main sizer => all other children
Instead of putting everything on the frame itself?
I've built a frame with a toolbar (using frame.CreateToolBar()). After
adding some toolbuttons to it everything looks nice. But when the frame
get's resized (getting smaller) the toolbar get's cut off at the right
end. Is there a way to show an arrow-button opening a popup-menu
containig all those tools which are not visible (due to less space) ?
The native toolbar used on Mac will do this, but so far the native toolbar widgets used on the other platforms don't and there isn't any custom code in wxWidgets to implement it.
Another problem wrt ToolBar: The wx.Frame containing the ToolBar uses
sizers to do the layout management. If all the children use less space
then the ToolBar the toolbar also get's cut off (as explained above).
Is there a way to take the size of the toolbar into account by
frame.Fit()?
Or do I have to fetch the toolbar.GetSize() and set it as size hint for
the frame ?
That's one way. Another way is to have a sizer manage the toolbar instead of the frame. In other words, don't use CreateToolBar but just create a wx.Toolbar like a normal widget and add it to a sizer along with the main content panel.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!