Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » CollapsibleButtons in trim area help(cannot resize the buttons)
CollapsibleButtons in trim area help [message #645771] Mon, 20 December 2010 09:11
Luca Ferrari is currently offline Luca Ferrari
Messages: 159
Registered: November 2009
Senior Member
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.
Previous Topic:CalendarCombo fix / support
Next Topic:PShelf on RAP
Goto Forum:
  


Current Time: Thu Jul 31 13:54:16 EDT 2014

Powered by FUDForum. Page generated in 0.11517 seconds