标签:
treeView1.ExpandAll();
treeview判断点击节点:
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) { if (treeView1.SelectedNode.Name == "节点名") { frm_cluster.ShowDialog(); } }
treeview 点击已经选过的节点如何触发事件:
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) { if (treeView1.SelectedNode.Name == "cluster") { frm_cluster.ShowDialog(); } treeView1.SelectedNode = null; }
在AfterSelect事件的末尾处,添加:treeView1.SelectedNode = null;
标签:
原文地址:http://www.cnblogs.com/dpf-10/p/5812097.html