Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 971
user304602 Avatar asked May 11 '26 13:05

user304602


2 Answers

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.

like image 92
Hans Olsson Avatar answered May 14 '26 04:05

Hans Olsson


This might be too late, but I just put my solution here; Works perfect for me: 1- Just leave the CheckedListBox Selection mode as "ONE' in property sheet. 2- in your code, loop thru the checked item in your checked Box using the checked item property as following: For each XX as 'DataTpe' in CheckedListBox.CheckedItems 'Here you assign each checked item to wherever you want to direct to' Next

like image 41
user3144575 Avatar answered May 14 '26 02:05

user3144575