20190410001 - 遍历控件参考

        /// <summary>
        /// 遍历控件-Check 全部选中
        /// </summary>
        /// <param name="control">容器控件</param>
        public void CheckBox_Select_all(Control control)
        {
            foreach (Control c in control.Controls)
            {
                if (c is CheckBox)
                {
                    CheckBox Ch = (CheckBox)c;
                    Ch.Checked = true;
                }
            }
        }

posted @ 2019-04-10 14:40  追逐苦痛  阅读(166)  评论(0编辑  收藏  举报