Hi
I have a checklist box and I am trying to Check and Uncheck the the Items with a single click.
My code seams to be checking and uncheking if the Item is not selected.
If I Click on an Item that is checked it will uncheck it or vice versa, but if I click on that same Item to check it again it won't.
Here is the coed.
Private Sub chklstBuilder_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles chklstBuilder.Click
Dim I As Integer = chklstBuilder.SelectedIndex()
If (chklstBuilder.GetItemCheckState(I)) = CheckState.Checked Then
chklstBuilder.SetItemCheckState(I, CheckState.Unchecked)
Exit Sub
End If
If (chklstBuilder.GetItemCheckState(I)) = CheckState.Unchecked Then
chklstBuilder.SetItemCheckState(I, CheckState.Checked)
End If
End Sub
thank you