zoukankan      html  css  js  c++  java
  • winform CheckedListBox实现全选/全不选

    /全选
            private void button3_Click(object sender, EventArgs e)
            {
                for (int i = 0; i < this.checkedListBox1.Items.Count; i++)
                {
                    this.checkedListBox1.SetItemChecked(i, true);
                }
     
    }
            //反选
            private void button4_Click(object sender, EventArgs e)
            {
                for (int i = 0; i < checkedListBox1.Items.Count; i++)
                {
                    if (checkedListBox1.GetItemChecked(i))
                    {
                        checkedListBox1.SetItemChecked(i, false);
                    }
                    else
                    {
                        checkedListBox1.SetItemChecked(i, true);
                    }
                }
  • 相关阅读:
    WPF 命令基础
    委托 C#
    Volley网络请求框架的基本用法
    MailOtto 实现完美预加载以及源码解读
    Android_时间服务
    Android_Chronometer计时器
    Android_Json实例
    完结篇
    就快完结篇
    MySQL 选出日期时间最大的一条记录
  • 原文地址:https://www.cnblogs.com/zhangruisoldier/p/4227020.html
Copyright © 2011-2022 走看看