How to use push-button in SWT? [message #1770766] |
Wed, 16 August 2017 19:34  |
Eclipse User |
|
|
|
Sorry for this probably stupid sounding question, but I couldn't figure out, how to use/implement this using the SWT-buttons.
I need a button that sends me an event, when I press it (i.e. when I lower the mouse-button) and another event, when I release it (i.e. when I lift the mouse button finger again).
The button should NOT maintain the status (like a check or toggle button, which gets selected on the first click and de-selected again by the second click).
The button I need should signal "pressed" really only while my mouse-finger is down.
Using PUSH-style I get an event only when lifting the finger again, but not when pressing it, so the "selection-state" is always false.
This is on WIndows 10 and Eclipse Neon/4.6.3.
|
|
|
|
Re: How to use push-button in SWT? [message #1770982 is a reply to message #1770970] |
Sun, 20 August 2017 11:29  |
Eclipse User |
|
|
|
Nitin Dahyabhai wrote on Sun, 20 August 2017 08:32How would someone using just the keyboard access this functionality?
Frankly: I don't care! And I don't think that the absence of a keyboard equivalent implies that one can or should not support a UI feature.
Sure, its nice and convenient if there exists a keyboard equivalent but there will always be some UI capabilities that are not available when using different input methods. How would you e. g. mimic a "long-press" or "hovering" over some item (which typically brings up some hint) using a keyboard? Or drag-and-drop?
Or how would you draw a line (or a box) in a drawing program other than by defining the first point by pressing and the second by releasing the mouse button? I don't know of any keyboard equivalent for such gesture, either.
[Updated on: Sun, 20 August 2017 11:37] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.07550 seconds