Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 15:31
Mario Marinato is currently offline Mario MarinatoFriend
Messages: 38
Registered: March 2011
Location: Brazil
Member
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: Fri Mar 29 11:40:55 GMT 2024

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

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

Back to the top