Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有 2 个树视图,说树视图 1 和树视图 2 ..单击树视图 1 中的一个节点,然后当我单击树视图 2 中的一个节点时,我需要显示两个树视图中单击的节点的节点值..?谁能给我一个想法在这个任务中..?
你会以完全相同的方式对两者进行操作。
private void treeView2_AfterSelect(object sender, TreeViewEventArgs e) { MessageBox.Show(treeView1.SelectedNode.Text + ", " + treeView2.SelectedNode.Text); }