private void button1_Click(object sender, EventArgs e) { string treetxt = treeView1.SelectedNode.Text;//获取到树节点信息 MessageBox.Show(treetxt); }
private void button2_Click(object sender, EventArgs e) { //tabControl1.SelectedTab = tabPage1;//可以跳转到tabControl1某一个选项卡,tabPage1是选项卡的Name
tabControl1.SelectedIndex = 1;//按索引跳转到指定选项卡
}