Jade M
Jade M

Reputation:

C# How do I check a selected item in a listbox using code?

I have a listbox with checkboxes, how do I check the checkbox of the selecteditem?

Thanks

Upvotes: 0

Views: 3893

Answers (1)

jeffm
jeffm

Reputation: 3151

Assuming Windows Forms, clb.SetItemChecked(clb.SelectedIndex,true) where clb is a CheckedListBox object.

Upvotes: 3

Related Questions