You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Activity
itg-assistant commentedon Jun 12, 2026
Luca answered 2017-01-16 19:41:17 UTC
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.
itg-assistant commentedon Jun 12, 2026
Michael Hensen answered 2017-01-16 19:56:48 UTC
Ouch !! I misunderstood the ClearSelected, my wrong.. :-)