码迷,mamicode.com
首页 > 其他好文 > 详细

checkedListBox

时间:2015-07-25 22:50:23      阅读:119      评论:0      收藏:0      [点我收藏+]

标签:

 checkedListBox一键删除多个选中items


private void button3_Click(object sender, EventArgs e) { for (int i = 0; i < checkedListBox1.Items.Count; i++) { if (checkedListBox1.GetItemChecked(i)) { checkedListBox1.Items.RemoveAt(i); i--; } }

checkedListBox反选

 private void button11_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);
                    }
                }
            }

 

checkedListBox

标签:

原文地址:http://www.cnblogs.com/18553325o9o/p/4676700.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!