Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I had a similar problem: I wanted to have a standard toolbar on the left side and a search text and button on the left. I found not really a solution. What I have done is that I override the fill-method in ToolBarContributionItem so that the layout of the CoolBarManager is changed. This is not a good solution, it works on Windows (which was enough in this case), but NOT on Linux, but it maybe helps:</p> <pre><code>protected void fillCoolBar(ICoolBarManager coolBar) { coolBar.setLockLayout(true); IToolBarManager mainToolBar = new ToolBarManager(SWT.FLAT | SWT.RIGHT); coolBar.add(new ToolBarContributionItem(mainToolBar, "main")); fillMainToolBar(mainToolBar); IToolBarManager searchToolBar = new ToolBarManager(SWT.FLAT | SWT.RIGHT); ToolBarContributionItem searchBarItem = new ToolBarContributionItem( searchToolBar, "search") { @Override public void fill(CoolBar coolBar, int index) { super.fill(coolBar, index); // change the layout of the cool-bar to have the search // controls on the right side GridLayout coolBarLayout = new GridLayout(2, false); coolBarLayout.marginHeight = 0; coolBarLayout.marginWidth = 0; coolBarLayout.horizontalSpacing = 20; coolBarLayout.verticalSpacing = 0; coolBarLayout.marginLeft = 10; coolBar.setLayout(coolBarLayout); GridData mainGridData = new GridData(SWT.LEFT, SWT.CENTER, true, false); GridData searchGridData = new GridData(SWT.RIGHT, SWT.CENTER, false, false); coolBar.getItem(0).getControl().setLayoutData(mainGridData); coolBar.getItem(1).getControl().setLayoutData(searchGridData); } }; coolBar.add(searchBarItem); searchToolBar.add(new SearchTextControl()); searchToolBar.add(searchAction); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload