How to find out which column what doubled clicked in a table viewer [message #443228] |
Wed, 22 September 2004 08:09  |
Eclipse User |
|
|
|
Hi All,
Anybody know how to find out which column was doubled clicked on from a
table viewer, the idea is the user double clicks on a column which has lots
of text in it and it's displayed in a pop up dialog box, this works because
I only had 1 long text colum, now I have two long text columns and I have
to find out which one the user double clicked on, to display the correct
data? Any ideas?
Cheers
Richard
|
|
|
|
Re: How to find out which column what doubled clicked in a table viewer [message #443320 is a reply to message #443228] |
Wed, 22 September 2004 11:35  |
Eclipse User |
|
|
|
Are you writing code for Windows?
If so, take a look on SWT Table Class, function
public TableItem getItem (Point point);
and do something similary using
final int LVM_SUBITEMHITTEST = OS.LVM_FIRST + 57; //from comctrl.h
with Point coordonates from MouseEvent (this code should run on Table
DblClickListener) fill LVHITTESTINFO
and call
OS.SendMessage (wTable.handle, LVM_SUBITEMHITTEST, 0, pInfo);
at the end in pInfo you have selected iIem (Row) and iSubItem (Column).
Other way, is to check the x obtained from MouseEvent in which TableColumn
is included...
Tiberiu
|
|
|
Powered by
FUDForum. Page generated in 0.04417 seconds