当我单击Treeview控件中的任何节点时如何打开新窗口 [英] How to open new window when i click on any node in treeview control
本文介绍了当我单击Treeview控件中的任何节点时如何打开新窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用xml加载treeview控件,并为每个节点使用导航网址.当我单击任何节点时,我需要打开新窗口并重定向到我在teeview中加载的URL.我要求在这个问题上提供帮助.
谢谢
Mahesh.
Hi,
I am loading treeview control with xml and using the naviation url for each node. When I click any node, I need to open new window and redirect to that url which I am loading in teeview. I request please help on this issue.
Thanks
Mahesh.
推荐答案
有2种解决方案,可以在这里找到:
http://generally.wordpress.com /2007/11/06/right-click-on-treeview-get-the-node-clicked-at/ [
There are 2 solutions for this and they can be found here:
http://generally.wordpress.com/2007/11/06/right-click-on-treeview-get-the-node-clicked-at/[^]
Although you might want to use MouseButtons.Left instead of MouseButtons.Right :)
Good luck!
查看TreeView.AfterSelect事件,并使用TreeViewEventArgs.Node获取当前选定的节点.
Look into the TreeView.AfterSelect event, and use TreeViewEventArgs.Node to get the currently selected node.
这篇关于当我单击Treeview控件中的任何节点时如何打开新窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文