Link to home
Start Free TrialLog in
Avatar of dastaub
dastaubFlag for United States of America

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.GetItemCheckState(ChkProviders.SelectedIndex)
        If chkstate = CheckState.Checked Then
            ChkProviders.SetItemCheckState(ChkProviders.SelectedIndex, CheckState.Unchecked)
        Else
            ChkProviders.SetItemCheckState(ChkProviders.SelectedIndex, CheckState.Checked)
        End If
 
ASKER CERTIFIED SOLUTION
Avatar of Wayne Taylor (webtubbs)
Wayne Taylor (webtubbs)
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial