Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying Labels based on check box selection

Status
Not open for further replies.

netzpic

Programmer
Jul 27, 2005
1
US
Hi guys,
I am new to programming and am trying to achieve the following:
I created a VB form with 2 check boxes. I want that if check box 1 is selected then checkbox 2 will be unselected if checkbox 2 is selected then I would like to unselect checkbox 1 and change the visible property of a text label.

Any idea ?




 
Use 2 Radio Buttons rather than checkboxes

on the checkchanged event of one of the buttons set the visability of the label / text etc..

Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
Label1.Visible = RadioButton1.Checked
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top