|
Re: Tree/TreeViewer: How to detect a click into the icon without selecting the TreeItem [message #547105 is a reply to message #546555] |
Thu, 15 July 2010 14:28 |
Grant Gayed Messages: 2150 Registered: July 2009 |
Senior Member |
|
|
> First, is there a better way than to use a MouseListener to detect icon
> clicks?
No, this is the way to do it.
> Second, is there a way, to detect clicks on a TreeItem's icon without
> having it automatically selected (I tried with event.doit and similar
> stuff, without an effect)?
Not specifically, but you can remember that the item's image was clicked and
then remove the item from the selection. For an example of filtering item
selections see
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet80.java?view=co .
I've tried this snippet on win32, gtk, and cocoa, and none of them show any
selection flash when selecting-then-deselecting an item.
HTH,
Grant
|
|
|
Powered by
FUDForum. Page generated in 0.02321 seconds