开发者

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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜