CheckedListBox 控件概述(Windows 窗体)CheckedListBox Control Overview (Windows Forms)

Windows 窗体CheckedListBox控件扩展ListBox控件。The Windows Forms CheckedListBox control extends the ListBox control. 它执行的几乎所有列表框 does 和还可以显示在列表中的项旁边的复选标记。It does almost everything that a list box does and also can display a check mark next to items in the list. 其他两个控件之间的差异是,检查列表框和仅支持DrawMode.Normal; 和列表框只能有一项或选择无的检查。Other differences between the two controls are that checked list boxes only support DrawMode.Normal; and that checked list boxes can only have one item or none selected. 请注意,所选的项将会突出显示在窗体上不选中项相同。Note that a selected item appears highlighted on the form and is not the same as a checked item.

检查列表框可以在设计时使用添加的项字符串集合编辑器或其项可以在运行时,集合中动态添加使用Items属性。Checked list boxes can have items added at design time using the String Collection Editor or their items can added dynamically from a collection at run time, using the Items property. 有关详细信息,请参阅如何:添加和删除项从 Windows 窗体 ComboBox、 ListBox 或 CheckedListBox 控件For more information, see How to: Add and Remove Items from a Windows Forms ComboBox, ListBox, or CheckedListBox Control.

请参阅See also