|ToolBarManager items stacked vertically instead of horizontally [message #997286]
||Fri, 04 January 2013 22:31
| Mark Leone
Registered: April 2012
I add two items to the ToolBarManager obtained from the view site, with the following code in a ViewPart instance:|
ToolBarManager mgr = (ToolBarManager) getViewSite().getActionBars().getToolBarManager();
CustomControlItem item1 = new CustomControlItem("someText");
CustomControlItem item2 = new CustomControlItem("someText");
the class CustomControlItem extends ControlContribution and creates a control that extends Button and returns it in its createControl() method.
The problem I'm having is that the two items show up in the toolbar stacked one on top of the other. When they're stacked this way, both labels are unreadable because the toolbar height is not sufficient to display two items vertically. The desired behavior is for them to be placed side by side.
All the sample code I've found through searching adds the items as I do, but no one mentions having the problem I'm seeing. The examples I saw were creating a ToolBarManager instance, but I'm using the one provided by the ViewSite.
[Updated on: Sun, 06 January 2013 21:48]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.03098 seconds