Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » No Mouse-Events from an open Combo -Box (Different behaviour on Windows XP / Linux GTK)
No Mouse-Events from an open Combo -Box [message #733421] Tue, 04 October 2011 17:19 Go to next message
Nixskut  is currently offline Nixskut
Messages: 2
Registered: July 2009
Junior Member
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 #733575 is a reply to message #733421] Wed, 05 October 2011 05:23 Go to previous messageGo to next message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
What not use a comboviewer and a postselection listener to avoid the selection events on keyboard navigation altogether?

---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: No Mouse-Events from an open Combo -Box [message #733791 is a reply to message #733575] Wed, 05 October 2011 16:08 Go to previous messageGo to next message
Nixskut  is currently offline Nixskut
Messages: 2
Registered: July 2009
Junior Member
Hello vijay,

it's a long story why we don't use ComboViewers, we are developing and maintaining about 20 Java-Desktop Applications and have encapsulated the GUI-Technology (Swing/JSF/SWT) in our own framework. The Event-Handling is encapsulated too, so there's just one place in the code for 4 SWT-Apps with about 100 Combo-Widgets where we have to change the use of the Event-handling - that is much easier for us than changing 150 Combo-Widgets to ComboViewer/ContentProvider.
Re: No Mouse-Events from an open Combo -Box [message #1022532 is a reply to message #733421] Fri, 22 March 2013 04:25 Go to previous message
Salman Awan is currently offline Salman Awan
Messages: 1
Registered: March 2013
Junior Member
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
Previous Topic:Trouble using swt GLCanvas on linux
Next Topic:Weird problems resizing Shell with 'setBounds()'
Goto Forum:
  


Current Time: Wed Oct 22 00:19:23 GMT 2014

Powered by FUDForum. Page generated in 0.04763 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software