当前位置:编程学习 > C#/ASP.NET >>

C#之TreeView、TreeNode使用实例代码

private void treeViewLeft_AfterSelect(object sender, TreeViewEventArgs e)
{
        String strNodeText = e.Node.Text;
        //根据点击的不同的节点,触发对应的事件
        switch (strNodeText)
        {
                case "aa":
                this.label1.Text = "fffff";
                break;
                case "bb":
                MDIParent1 md = new MDIParent1();
                md.Show();
                break;
                case "cc":
                break;
        }
}
补充:软件开发 , C# ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,