![]() ![]() | ||
You can turn checkboxes or radio buttons into toggle buttons if you set their Appearance property to Button (the other option is Normal). Toggle buttons resemble standard buttons but act like the checkboxes or radio buttons they really are. When you click a checkbox button, for example, it stays clicked until you click it again.
You can see three radio buttons that have been made into toggle buttons in Figure 6.14.
Also, in the ToggleButtons example on the CD-ROM, you can click the "Create toggle buttons" button to change the appearance of radio buttons at run time. Here's the code that does the trick:
Private Sub Button1_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button1.Click RadioButton1.Appearance = Appearance.Button RadioButton2.Appearance = Appearance.Button RadioButton3.Appearance = Appearance.Button End Sub
![]() ![]() | ||