Hi all,
as suggested in this thread I'm using collapsible buttons into the trim area to display an outlook-similar button panel.
My plugin.xml contains the following:
<menuContribution
locationURI="toolbar:org.eclipse.ui.trim.vertical1">
<toolbar
id="HRPM-RCP-git.toolbar4">
<control
class="hrpm.rcp.gui.TrimAreaControlContribution"
id="hrpm.rcp.gui.TrimAreaControlContribution">
</control>
</toolbar>
</menuContribution>
and the TrimAreaControlContribution is the following:
public class TrimAreaControlContribution extends
WorkbenchWindowControlContribution {
public TrimAreaControlContribution() {
}
public TrimAreaControlContribution(String id) {
super(id);
}
@Override
protected Control createControl(Composite parent) {
Composite inner = new Composite(parent, SWT.NONE);
GridLayout gl = new GridLayout(1, true);
gl.marginBottom = 0;
gl.marginHeight = 0;
gl.marginWidth = 0;
gl.marginHeight = 0;
inner.setLayout(gl);
CollapsibleButtons collapsibleButtons = new CollapsibleButtons(parent,
SWT.NONE, IColorManager.SKIN_BLUE);
collapsibleButtons.setLayoutData(new GridData(GridData.GRAB_VERTICAL | GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_END));
for (int i = 0; i < 5; i++) {
collapsibleButtons.addButton("Button "+i, "Tooltip "+i, null, null );
}
return collapsibleButtons;
}
}
The problem is that the widget is added to the right place, but its size is not correct, and so the element appears collapsed (i.e., too small). I cannot resize the toolbar to make the buttons visible so I don't know how to proceed.
Any help will be appreciated.
Thanks.