How to programmatically set check on listview control

  • Thread starter Thread starter Lilly
  • Start date Start date
L

Lilly

Hi,

I have a listview control and set its checkboxes = true.
How am I able to programmatically set check on it instead
of using mouse click?

e.g. if I want to set check for the first listview item, I
declared this:

Dim e As ItemCheckEventArgs = New ItemCheckEventArgs
(indices(i), CheckState.Checked, CheckState.Unchecked)

and send to ListView1_ItemCheck(sender, e)

what should I do in ItemCheck event handler?

Thank you!
 
Hi Lilly,

Check out the SetItemChecked method on the CheckedListBox class, you can
check or unchcek items with this.

Paul
 
Back
Top