mercredi 6 janvier 2016

Checkbox does does not work in VB.Net form

I have two checkboxes for two groupboxes to enable visibility or invisibility of each one at a time but somehow one is working(chboNew) the other one(chboIssue) doesn't! here is the code I have written for it, any help would be appreciated:

Private Sub chboIssue_CheckStateChanged(sender As Object, e As EventArgs) Handles chboIssue.CheckStateChanged
    If chboIssue.Checked = True Then
        gbIssueSearch.Visible = True
        gbNewSearch.Visible = False
        chboNew.Checked = False
    ElseIf chboIssue.Checked = False Then
        gbIssueSearch.Visible = False
    End If
End Sub

Private Sub chboNew_CheckStateChanged(sender As Object, e As EventArgs) Handles chboNew.CheckStateChanged
    If chboNew.Checked = True Then
        gbNewSearch.Visible = True
        gbIssueSearch.Visible = False
        chboIssue.Checked = False
    ElseIf chboIssue.Checked = False Then
        gbNewSearch.Visible = False
    End If
End Sub




Aucun commentaire:

Enregistrer un commentaire