Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Vertical ToolBar(How do I prevent multiple columns on a vertical ToolBar?)
Vertical ToolBar [message #675813] Wed, 01 June 2011 11:31
Eclipse UserFriend
I'm creating a vertical ToolBar:

ToolBar toolBar = new ToolBar( parent, SWT.RIGHT | SWT.VERTICAL );


And then adding items to it:

for ( MyObject myObject: myObjects ) {
    ToolItem toolItem = new ToolItem( toolBar, SWT.NONE );
    toolItem.setText( myObject.getLabel() );
    toolItem.setImage( myObject.getImage() );
}


The toolbar is created correctly, but as some labels are too long, there are some cases in which new items are created on a second column, in front of the previous item.

So, instead of getting a toolbar that looks like

Item with a very long label
Tiny item
Little item


I get a toolbar that looks like

Item with a very long label
Tiny item                    Little item


If the long label is long enough, a third column will appear.

Does anyone know if there's a way to prevent the creation of a new column on the toolbar?

Thank you.

--
Mário Marinato
from Brazil
Previous Topic:Layout woes
Next Topic:SWT ExpandItem widget layout/size problem
Goto Forum:
  


Current Time: Wed Jul 02 16:16:28 EDT 2025

Powered by FUDForum. Page generated in 0.03450 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top