dastaub
asked on
Visual Basic 2005 CheckedListBox control question
The below code is In the Click sub of a CheckedListBox, the code checks and unchecks a single row inside a checkedListBox with a single click. EXCEPT FOR if the end user clicks and then re clicks on the same row. The control will not respond to the 2nd single click without clicking on another row inbetween single clicks. The name of the control is ChkProviders. There appears to be some sort of refresh needed inbetween each change?
Dim chkstate As CheckState
chkstate = ChkProviders.GetItemCheckS tate(ChkPr oviders.Se lectedInde x)
If chkstate = CheckState.Checked Then
ChkProviders.SetItemCheckS tate(ChkPr oviders.Se lectedInde x, CheckState.Unchecked)
Else
ChkProviders.SetItemCheckS tate(ChkPr oviders.Se lectedInde x, CheckState.Checked)
End If
Dim chkstate As CheckState
chkstate = ChkProviders.GetItemCheckS
If chkstate = CheckState.Checked Then
ChkProviders.SetItemCheckS
Else
ChkProviders.SetItemCheckS
End If
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.