|Re: SelectionListener not called when setSelection invoked? [message #458625 is a reply to message #458623]
||Sun, 17 July 2005 05:13
| Konstantin Scheglov
Registered: July 2009
This is normal. Just call handler yourself, if you need.
In other case (if it calls it automatically) you will need more
changes: add field flag that say, if this selection is because you set
it and it should not be handled, plus you will need to set/clear in and
also check in handler.
> I have a Tree control in a TreeViewer in eclipse 3.1. I want to change the
> selected item in the tree when something is dragged on top of it. I used
> Tree.setSelection(TreeItem) to set the selected item to the one that is the
> drop target. If I call getSelection immediately afterwards the correct item
> is now marked as selected.
> I also have a SelectionListener for the tree. This is called correctly when
> I click on items in the tree and the selection changes, however, when I set
> the selection with Tree.setSelection, the SelectionListener is not invoked.
> Is this the normal behavior ? bug? or perhaps something I am doing wrong?
Powered by FUDForum
. Page generated in 0.02039 seconds