Toolbar with groups
Hi,
I want to create a toolbar where the user can select the group of tools visible. Something like this: http://doc.trolltech.com/qq/qq07-qt32-an-even-better-qt.html#newtoolboxwidget
Any idea how I can do it? Or screenshots of Swing toolbars with similar functionalities? How to manage horizontal display?
Well, any idea welcome...
[357 byte] By [
genepia] at [2007-9-30 2:19:11]

Honestly, it looks like you could easily just use a Box, BoxLayout, Or GridBagLayout and some well set up JLabels to reproduce the functionality of the pic on the left. Just use a MouseListener (and maybe a MouseMotionListener for rollover effect) for interaction.
The pic on the right would be harder and would need some custom painting.
Hope this helps,
Josh Castagno
http://www.jdc-software.com
Hi,
I managed to get the best appearance using Boxes and JLabels, under Win2K, as you suggested.
JToolbar is not a good choice because it's stubborned to display horizontally when teared off, even when created with a vertical layout (I would call this a bug). And experiments with JMenu or JPopupMenu didn't give the expected result...
Now, I've a layout question: how to get the group headers to stick at the top or the bottom of the Box?
When the first group is opened, the header must be at the top, displaying all the tools in that group. All other headers must be at the bottom.
When the user select another group, the first group closes, and all the headers down to the one selected move to the top, to show the tools of the selected group. Other headers stick on the bottom...
I'm fighting with Box glue and layout manager to get this behaviour...