Combo box in Window ActionBar [message #1396560] |
Tue, 08 July 2014 09:32  |
Eclipse User |
|
|
|
Hallo,
I've recently faced some issues when I tried to put a combo box inside a window toolbar (or ActionBar as you may want to call it). My idea was to have the combo box just on the right of the window tab (with the title..).
What happens is that when I click on the combo, aiming to choose an option, it flickers and doesn't allow me to select anything. In the back-end my action handler is never called, because there is no event SWT.Selection.
On the other hand, it works correctly if i put my combobox in the main application toolbar, but this is not what I want to do.
Has anybody already put a combobox into a window toolbar?
Could it be that this issue is related to a set-focus lose-focus problem?
Thanks
|
|
|
|
|
|
Re: Combo box in Window ActionBar [message #1645533 is a reply to message #1396560] |
Mon, 02 March 2015 10:09  |
Eclipse User |
|
|
|
I just faced the same problem with Combobox in toolbars. Searched the web a little bit and found a solution using an action that has a menu (created with IMenuCreator).
The popup works fine this way and the flickering is gone.
The reason for my post is now that I am using an action instead of a real Combo, the size is automatically calculated based on the current text of the action. As the string content varies depending on the menu selection, it changes its size whenever another value was selected.
I guess the reason is that the toolbar layout is set to FlowLayout or something similar and I couldn't find a way to either set it to e.g. GridLayout or set the size or LayoutData of the Action.
Is there a way to work around this issue?
[Updated on: Mon, 02 March 2015 10:10] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.22148 seconds