OK. Hopefully I'm not spouting anything too obvious here, but the documentation is completely inconsistent.http://msdn2.microsoft.com/en-us/library/system.windows.forms.checkedlistbox.selectionmode.aspx
Thiis page says that checkedlistbox
controls can only have a selection
mode of None or One. To quote:
"For CheckedListBox objects, multiple
selection is not supported. You can set the mode to one item or no items."
But the main CheckedListBox documentation page says:
presents a list of items that the user can navigate by using the keyboard or the scrollbar on the right side of the control. The user can place a check mark by one or more items and the checked items can be navigated with the CheckedListBox..::.CheckedItemCollection
So, come on Microsoft, which one is it? Can a checkedlistbox be used for multi-selections or not?
However, there is some good news. The functionality doesn't follow the documentation. If you set the CheckedListBox's selectionmode
property to "One" (default), it lets you multi-select anyway! Of course, this is effectively "undocumented" behaviour which could be "fixed" in a future update of the .Net framework, but for now it works.