Find a text field in the menu bar

In an RCP Eclipse application, is there a way to have a textbox (for search) in the menu bar? For example, I have a menu:

File Edit ...                                          Search: |___text field___|

      

The text box is located at the right end of the menu bar.

+2


a source to share


2 answers


I don't think this is easily possible. But you can use CoolBar to create this function .



0


a source


You can place a SWT control on a toolbar, but it doesn't work for menus. Here is the path to the toolbar:

  • Open the Extensions tab in the plugin.xml file

  • Add extension menuContribution to org.eclipse.ui.menus and set it as toolbar (toolbar: ID)

  • Add a toolbar to this menu.

  • Add control to this toolbar

  • Double click and create a class that extends WorkbenchWindowControlContribution and populates the createControl (...) function with the required SWT controls.



After setting menuContribution as a menu, it is still possible to add a control, but unfortunately it does not display any controls.

0


a source







All Articles