开发者

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?


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜