标签:
1.左边一个treeview,右边一个tabcontrol;
2.调整控件让tree在tabcontrol上,并让treeview压住tab页
3.将tab页的name设置成treeview的node text
4.AfterSelect写入如下代码
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) { string _strKey = treeView1.SelectedNode.Text; tabControl1.SelectedTab = tabControl1.TabPages[_strKey]; }
标签:
原文地址:http://www.cnblogs.com/wuhailong/p/5408474.html