No Mouse-Events from an open Combo -Box [message #733421] |
Tue, 04 October 2011 13:19  |
Eclipse User |
|
|
|
Hi,
I need a Combo(Box), that fires only Events, when the User is REALLY selecting an element, not when he browses the list with the Arrow-Keys (because some "expensive" work starts after the selection). So I added a Focus/Keyboard/Mouse-Listener to the Combo instead of the SelectionListener.
On Linux/GTK I get a "MouseUp"-Event wenn the user clicks on the combo, the Popup-List is displayed and a "MouseUp"-Event comes when the user clicks on the selected Item and I was happy...
But on Windows XP, I get a "MouseUp"-Event wenn the user clicks on the combo, the Popup-List is displayed and ... no more Mouse-Events, until the Popup is closed!???
Am I really the only one who has this Problem? Is this a Bug? Is there a Workaround?
|
|
|
|
|
Re: No Mouse-Events from an open Combo -Box [message #1022532 is a reply to message #733421] |
Fri, 22 March 2013 00:25  |
Eclipse User |
|
|
|
I faced this problem as well and had to do a workaround. I added both a KeyListener and a SelectionListener to the Combo. Then I set a flag in the KeyListener's keyPressed callback when the UP/DOWN arrow keys are pressed (and unset it in the keyReleased callback). In the SelectionListener's widgetSelected callback, I check whether the flag has been set or not.
HTH,
Salman
|
|
|
Powered by
FUDForum. Page generated in 0.06178 seconds