|
|
Re: MenuDetectListener: how can I know if from keyboard or mouse [message #662314 is a reply to message #662154] |
Wed, 30 March 2011 08:48 |
David Pérez Messages: 228 Registered: July 2009 |
Senior Member |
|
|
For instance, I use it for copying the content of the current cell to the clipboard. I'm not very worried for this issue, but it is a little confusing to the user to deal with a cell, that could not be in the selected row.
Grant Gayed wrote on Tue, 29 March 2011 10:33 | Hi The MenuDetect event does not contain this info. I was going to suggest
that you could listen for SWT.MouseDown/Up on the Table, and that a
MenuDetect that comes in between these would indicate that it was triggered
by the mouse, but I see that this approach would not currently work on OS X
due to https://bugs.eclipse.org/bugs/show_bug.cgi?id=79930 . I can't think
of another approach to suggest, other than to consider changing the
convention slightly, such that if the pointer is detected to be within the
Table then the context menu for the cell it's over is always shown
regardless of how it was triggered. This may or may not make sense,
depending on your app.
Grant
|
|
|
|
Powered by
FUDForum. Page generated in 0.03105 seconds