Search code examples
vb.netwinformscheckedlistbox

CheckedListBox VB.Net MultiExtended SelectionMode


I have a CheckedListBox with a few items and I want to allow user to select more than one using arrows keys or mouse clicks combined with shift and ctrl keys so I set SelectionMode property to MultiExtended.

In design time it is not possible I get an error:

value property is not valid.

and if I set it in runtime by doing:

clbEmployees.SelectionMode = SelectionMode.MultiSimple

I get an error too:

CheckedListBox is not compatible with multiple selection.

How could I do this?


Solution

  • It's not supported for the CheckedListBox.

    However, I'm fairly sure that you could mimic that functionality in a ListView. Just look at the CheckBoxes and MultiSelect properties of the Listview. As far as I can tell from the documenation those are compatible.