Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to use push-button in SWT?
How to use push-button in SWT? [message #1770766] Wed, 16 August 2017 23:34 Go to next message
Michael Moser is currently offline Michael MoserFriend
Messages: 29
Registered: October 2012
Location: Zürich, Switzerland
Junior Member
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 #1770970 is a reply to message #1770766] Sun, 20 August 2017 06:32 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 3022
Registered: July 2009
Senior Member

How would someone using just the keyboard access this functionality?

Nitin Dahyabhai
Eclipse Web Tools Platform
Re: How to use push-button in SWT? [message #1770982 is a reply to message #1770970] Sun, 20 August 2017 15:29 Go to previous message
Michael Moser is currently offline Michael MoserFriend
Messages: 29
Registered: October 2012
Location: Zürich, Switzerland
Junior Member
Nitin Dahyabhai wrote on Sun, 20 August 2017 08:32
How 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 15:37]

Report message to a moderator

Previous Topic:please ignore...
Next Topic:Can one have the button label below the button icon?
Goto Forum:
  


Current Time: Fri Dec 15 23:43:03 GMT 2017

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

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