|
|
|
Re: handling a right mouse click over a TreeTable [message #446419 is a reply to message #446409] |
Wed, 24 November 2004 18:21 |
Eclipse User |
|
|
|
Originally posted by: yvon_thoraval.mac.com
Paul Singleton a écrit :
> I suggest that you handle the MenuDetect event, which is raised
> when the user does whatever it takes to request a context menu
> on her platform.
Thanks a lot, it works very well on Shell :
Display display = new Display();
Shell shell = new Shell(display);
shell.setText(mH);
shell.setSize(1024, 425);
shell.open();
final Shell dialog = new Shell(shell, SWT.POP_UP | SWT.BORDER |
SWT.TITLE);
shell.addListener (SWT.MenuDetect, new Listener () {
public void handleEvent (Event event) {
System.out.println("SWT.MenuDetect");
dialog.setVisible (true);
}
});
tableTree = new TableTree(shell, SWT.BORDER);
tableTree.setSize(1020, 400);
tableTree.setLocation(2, 2);
tableTree.addListener (SWT.MenuDetect, new Listener () {
public void handleEvent (Event event) {
dialog.setVisible (true);
}
});
BUT not at all on the TreeTable, may be this is OS dependant (i'm
working on MacOS X.3.6). The room left by TreeTable to the Shell is only
2 pixels wide... then, i can't use it ))
I should also mention that SelectionListener isn't working very well,
getSelection() and getText() only returns the correct values for the
first row (index 0) for the other getSelection() returns - 1 and
getText() null.
Do you think all the above could be an issue on MacOS X ???
Best,
Yvon
|
|
|
|
Powered by
FUDForum. Page generated in 0.03974 seconds