checkedListBox1.ClearSelected dosn't work properly

  • Thread starter Thread starter Reza
  • Start date Start date
R

Reza

checkedListBox1.ClearSelected(),dosn't clear my selections in my
checkedboxlist.
How can I clear an specific item based on its value ,name or anything else?

thanks for your response.
 
Reza said:
checkedListBox1.ClearSelected(),dosn't clear my selections in my
checkedboxlist.
How can I clear an specific item based on its value ,name
or anything else?


You can use the checkedlistbox's 'FindString' or 'FindStringExact methods to
get the index of a specific item, then you can use 'SetSelected(Index,
False)' to uncheck the item.
 
Thanks,but it dosn't uncheck the item ,,it only removes the focus,that's it.
 
Reza said:
Thanks,but it dosn't uncheck the item ,,it only removes the
focus,that's it.

Use 'SetItemChecked' instead of 'SetSelected'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top