| | |
Checking and UnChecking a CheckListBox
Thread Solved |
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.
thank you
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![]() |
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: VB6 - dll file not found error 53
- Next Thread: How to detect Screen Resolution in VB6 ?
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






