0

I have a program below that I want to display when checkbox is checked and hide when unchecked. I created a Message Label for it but the thing is that when its unchecked, my messagelabel and message displays.... Pls is there a way I can hide the message without the message label disappearing too?

This is the code i have already.

 CheckboxMsgLabel.Text = "All Members Receive a 10% Discount"
        CheckboxMsgLabel.Visible = MembersbeneCheckBox.Checked
3
Contributors
5
Replies
6
Views
4 Years
Discussion Span
Last Post by Icone
0

From the code above:

    Private Sub CheckBox1_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles CheckBox1.CheckedChanged
        If CheckBox1.Checked = True Then
            CheckboxMsgLabel.Visible = True
            CheckboxMsgLabel.Text = "All Members Receive a 10% Discount"
        Else
            CheckboxMsgLabel.Visible = False
        End If
    End Sub
0

Thanks for ur help. With Label border, you will notice the difference when checked and unchecked... I hope you understand what i mean? I want "all members receive a 10% discount" to hide and the message label still show. Again, I'm trying to clear radiobutton and the message label at the same time... only one works. Pls

0

Visible property will all of solve that, just have a try in your own. First example given, gave you a guide already.

Edited by Icone: my mistake

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.