TreeView和TabControl

 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;//按索引跳转到指定选项卡 
}

 

posted @ 2015-06-10 15:15  九省巡按  阅读(293)  评论(0编辑  收藏  举报