how to programmatically click a .NET 4 WinForm TreeView TreeNode
I need to开发者_运维知识库 programmatically click a treeview treenode so that the NodeClick event fires. I used to be able to call Select(), but with this version of .NET (4) that method has gone away.
Anyone know what the new approach is?
Thanks, Mike
Where have you seen a Select() method on a TreeNode? I must have missed something :-)
Anyway, if you want to Select the node, you can do this:
TreeNode node;
node.TreeView.SelectedNode = node;
精彩评论