|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
Registered: July 2009
> First, is there a better way than to use a MouseListener to detect icon |
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
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.
Powered by FUDForum
. Page generated in 0.01448 seconds