Mic*_*ael 5 toolbar eclipse-rcp
我想在Eclipse RCP应用程序的工具栏中有一个右对齐的搜索字段.我已经将文本字段创建为ControlContribution以及ActionBarAdvisor类中的相应搜索操作:
protected void fillCoolBar(ICoolBarManager coolBar) {
IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT);
//...
toolbar.add(new ControlContribution("searchText") {
//...
Run Code Online (Sandbox Code Playgroud)
这有效,我在工具栏中有搜索字段.但是如何在右侧将搜索文本(或工具栏与搜索文本)对齐?
谢谢,迈克尔
如果您的意思是将搜索工具栏定位在主工具栏的右侧站点上,那么请考虑使用这些区域(当使用org.eclipse.ui.menus扩展点时):
toolbar:org.eclipse.ui.main.toolbar - the top-level tool bar
toolbar:org.eclipse.ui.trim.command1 - the top left trim
toolbar:org.eclipse.ui.trim.command2 - the top right trim
toolbar:org.eclipse.ui.trim.vertical1 - the left vertical trim
toolbar:org.eclipse.ui.trim.vertical2 - the right vertical trim
toolbar:org.eclipse.ui.trim.status - the status line trim
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3734 次 |
| 最近记录: |