• 博客园logo
  • 会员
  • 周边
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
智美手机APP
国内最专业的智能手机APP应用解决方案提供商。智美手机APP为您提供成熟稳定的专业化产品、产品定制等服务。
博客园    首页    新随笔    联系   管理    订阅  订阅

treeview添加

TreeNode node = new TreeNode();
node.Name = "区域";
node.Text = "区域";
node.ContextMenuStrip = cmsquyu;

TreeNode childnode = new TreeNode();
childnode.Name = "设备1";
childnode.Tag = source.Common.userid[0];
childnode.Text = "设备1";
childnode.ContextMenuStrip = cmsshebei;

Panel pel = drawPanel(1);
pel.Size = new Size(panel2.Size.Width / 2, panel2.Size.Height / 2);
pel.Location = new Point(0, 0);
panel2.Controls.Add(pel);
TreeNode smallchildnode = new TreeNode();
smallchildnode.Name = "通道1";
smallchildnode.Tag = 1 ;
smallchildnode.Text = "通道1";
smallchildnode.ForeColor = Color.Red;
smallchildnode.ContextMenuStrip = cmstongdao;
childnode.Nodes.Add(smallchildnode);

posted @ 2012-07-18 17:35  小敏博客园  阅读(307)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3