How to detect key state when clicking a table column [message #327072] |
Tue, 08 April 2008 11:01  |
Eclipse User |
|
|
|
Hi,
I would like to react to the SWT.Selection event on click of a header of a
table column, depending on the state of the Control key.
But Event.stateMask is always 0.
I have tried to capture MouseDown on the table, but isn't called when
clicking on a header.
Any suggestion will be greatly welcome.
|
|
|
|
Re: How to detect key state when clicking a table column [message #327084 is a reply to message #327078] |
Wed, 09 April 2008 02:56  |
Eclipse User |
|
|
|
Thanks Grant,
your tip has been helpful. I'm surprise to see how such a long
outstanding request remains unsolved (from year 2005).
Here is my workaround (for Win32, the only platform I'm currently using):
if ((OS.GetKeyState(OS.VK_CONTROL) & 0xF0) == 0) {
....
}
In this way I can do specific processing when the control key is being
held down. Luckily most Win32 API's are accessible through SWT.
Grant Gayed wrote:
> Hi,
> This is not currently supported. SWT.Selection events by convention don't
> have their state mask set with this info, so you need to get a MouseDown,
> which TableColumn does not send. The existing request for a table header
> widget, which is what would surface this event, is
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=93129 .
> Grant
|
|
|
Powered by
FUDForum. Page generated in 0.03591 seconds