C#TreeView,添加子节点

C#TreeView,添加子节点

2023年6月22日发(作者:)

C#TreeView,添加⼦节点using System;using c;using entModel;using ;using g;using ;using ;using ;namespace _03TreeView的使⽤{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { //添加根节点 //TreeNodeCollection:当前树状菜单节点的集合 所有的数据都要添加到这个集合下 (()); } //添加⼦节点 private void button2_Click(object sender, EventArgs e) { //获得要添加⼦节点的根节点 //获得当前选中的节点 TreeNode tn = edNode; //每⼀个节点都可以看做是⼀个节点集合 也可以⽆限的向下添加⼦节点 (); //添加⼦节点 } }}

发布者:admin,转转请注明出处:http://www.yc00.com/xiaochengxu/1687386388a6222.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信