Wednesday, February 18, 2009 8:00 PMIs there a way to tell when an item in a tree view has been deselected or otherwise if the treeview has lost focus?
There is the "Leave" event, but the problem I have is my treeview is part of a UserControl that is embeded in a dock bar I'm adding to an exsisting program. The controls in the UserControl seem to retain their focus status regardless of the focus status of the dockbar or usercontrol.
Wednesday, February 18, 2009 11:31 PMThe TreeView.AfterSelect documentation contains a clue that might help you:
This event does not occur when the node is unselected. To detect this occurrence, handle the Control.MouseUp event and test the TreeNode.IsSelected property.