Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Custom control contribution in view toolbar(Layout problems in the custom control)
Custom control contribution in view toolbar [message #517599] Mon, 01 March 2010 13:44
Catalin Gerea is currently offline Catalin GereaFriend
Messages: 89
Registered: July 2009
Location: Bucharest, Romania

I have added programmatically a control contribution to a view toolbar like this:
IActionBars aBars = getViewSite().getActionBars();
    IToolBarManager tbMgr = aBars.getToolBarManager();

    // Add combo to change graph type
    IContributionItem scaleItem = new ControlContribution("type") {
      protected Control createControl(Composite parent) { ... code of the contribution ... };

The control contribution consists of the following:
Button_with_image:Scale:Button_with_image:Separator:Button_w ith_image. All images are 16x16 pixels.

1. The control contribution is displayed in the right of the view's toolbar. How can I display it in the left of the view toolbar? (for example like the breadcrumb is displayed).
2. The scale is not displayed completely. I can see the top of the scale but not all of it. I have tried to set a GridData.heightHint to the scale to 16 but it did not worked. As far I could detect from the code the default height of a scale is 41 pixels. Assuming that I do not want to change the height of the images to match the one of the scale how can I have a nice looking control contribution to the view's toolbar?

Any help would be appreciated since I have ran out of ideas.

Time is what you make of it.
Previous Topic:Broken Editor-Title
Next Topic:Associate file-extension to 2 diff content-types based on file name patterns
Goto Forum:

Current Time: Wed Jun 19 19:14:48 GMT 2024

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

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

Back to the top