如何将CheckBox与CheckedListBox一起使用 [英] How to use a CheckBox with a CheckedListBox
本文介绍了如何将CheckBox与CheckedListBox一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用CheckBox选择CheckedListBox中的所有项目?
How can I use a CheckBox to select all the items in a CheckedListBox?
推荐答案
签出 ^ ],其中包含该控件的演练以及如何遍历列表.
干杯.
Check out this article on MSDN[^] with a walkthrough of the control and an example of how to iterate through all the items in the list.
Cheers.
计算项目的数量,如果该数量等于checkedlistbox对象中checked复选框的数量.如果与checkbox.Selected = true相同,则为false
count the number of items and if that number equals the number of checked checkbox in the checkedlistbox object. if the same than checkbox.Selected = true else false
这篇关于如何将CheckBox与CheckedListBox一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文