Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

The System.Web.UI.WebControls.TreeView class offers this event, but the Forms version of TreeView doesn't. What's the equivalent in the Forms world? I'm using AfterSelect but it doesn't seem quite right. Maybe it is in fact what I'm looking for but the documentation is a bit hazy.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
224 views
Welcome To Ask or Share your Answers For Others

1 Answer

There's none in WinForms TreeView. To quote MSDN for TreeView.AfterSelect:

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.

Yes, this sucks.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...