Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » toolbar does not wrap
toolbar does not wrap [message #916108] Tue, 18 September 2012 10:40
Dirk Hoffmann is currently offline Dirk Hoffmann
Messages: 163
Registered: July 2009
Senior Member
Hi,

(sorry for cross posting this in the rcp news group - didn't recognize
that there is this more specific one)

Although I created a ToolBarManager with the SWT.WRAP option it doesn't
wrap when resizing the view containing the controlArea composite to a
width too small to display all toolbar items in a single row. This is
the code that creates the ToolbarManager and adds items to it:

protected void buildControlArea(Composite controlArea) {
ToolBarManager toolBarManager = new
ToolBarManager(SWT.HORIZONTAL|SWT.FLAT|SWT.WRAP);
toolBarManager.createControl(controlArea);

for (IContributionItem contribution : _controlAreaContributions) {
toolBarManager.add(contribution);
}

toolBarManager.update(true);
}

Does anybody have an idea why wrapping doesn't work?

It is with Eclipse 3.6.

Do I have to register an eventhandler with some kind of resize event or
do I have to take special care which layout mangers to use for the tool
bar's parent composite?

Would be great if anybody could help!

Regards,
Dirk
Previous Topic:Use AutoCompleteField and ContentProposalAdapter
Next Topic:Error annotations lost in reconciler
Goto Forum:
  


Current Time: Wed Jul 30 19:23:58 EDT 2014

Powered by FUDForum. Page generated in 0.02139 seconds