Checked ListBox ClearSelected() not working

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!

I have 3.2.20 running but the CheckedListbox doesn’t clear with ClearSelected() an not with chkListbox.Update()..
I now have this as a workaround:

for (int x = 0; x < mRoles.Count; x++)
lstRoles.SetItemChecked(x, false);


  • You must to post comments

Ouch !! I misunderstood the ClearSelected, my wrong.. 🙂

  • You must to post comments

ListBox.ClearSelected() is the same as ListBox.SelectedIndex = -1. It removes the selected item, not the checked ones. The CheckedListBox can have 1 selected item and multiple checked items.

To uncheck all items you need to call SetItemChecked(), as you already did. Consider that an app may override the state of an item processing OnItemCheck and changing the state.


  • You must to post comments
Showing 2 results
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
File Name Size
There are currently no files uploaded.
Maximum number of files 5, maximum file size 3.9MB.
Supported file formats: zip pdf gif jpg bmp png cs vb theme json mixin.theme