博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
c# treeview 节点的全选/取消
阅读量:4213 次
发布时间:2019-05-26

本文共 545 字,大约阅读时间需要 1 分钟。

 /// <summary>
        /// 树单击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            treeView1.SelectedNode = e.Node; // 
            SetTreeNodeChecked(treeView1.SelectedNode);
        }
/// <summary>
        /// 节点全选/取消
        /// </summary>
        /// <param name="tn"></param>
        private void SetTreeNodeChecked(TreeNode tn)
        {
            if (tn == null) return; // 若为空,则返回
            if (tn.Nodes.Count > 0)
            {
                foreach (TreeNode item in tn.Nodes)
                {
                    item.Checked = tn.Checked;
                    SetTreeNodeChecked(item);
                }
            }
        }

转载地址:http://etzmi.baihongyu.com/

你可能感兴趣的文章
PowerDesigner 正向工程 和 逆向工程 说明
查看>>
PowerDesigner 模型文档 说明
查看>>
PowerDesigner 系列 小结
查看>>
Oracle 升级10.2.0.5.4 OPatch 报错Patch 12419392 Optional component(s) missing 解决方法
查看>>
Oracle sessions,processes 和 transactions 参数 关系 说明
查看>>
RMAN 备份报错 RMAN-06207 RMAN-06208 解决方法
查看>>
[INS-35172] Target database memory (XXMB) exceeds the systems available shared memory ({0}MB) 解决方法
查看>>
深入理解 OUI(Oracle Universal Installer)
查看>>
Oracle LOB 详解
查看>>
磁盘性能 -- IOPS 和 吞吐量 说明
查看>>
Oracle Heap size XXK exceeds notification threshold (2048K) 解决方法
查看>>
Oracle Gloden Gate 系列三 -- GG 支持与不支持的对象类型与操作 说明
查看>>
PowerDesigner PDM 生成SQL脚本 去除 引号 方法
查看>>
Oracle Golden Gate 系列四 -- GG 安装 与 卸载 理论知识
查看>>
关系数据库 范式(NF: Normal Form) 说明
查看>>
Oracle Golden Gate 系列五 -- GG 使用配置 说明
查看>>
Oracle Golden Gate 系列六 -- 11gR2 Ora2Ora 单向复制 GG 示例
查看>>
Oracle Golden Gate 系列七 -- 配置 GG Manager process
查看>>
ORA-00600:[32695], [hash aggregation can't be done] 解决方法
查看>>
Oracle SQL中使用正则表达式 执行报ORA-07445 [_intel_fast_memcpy.A()+10] 错误
查看>>