master_2013
Active member
- Joined
- Jul 8, 2013
- Messages
- 41
- Programming Experience
- Beginner
i want to use several radio buttons in a group box and there are some question when it is checked whatever it checked that display one by one on a label
like
1: are u a gamer radio btn yes radiobtn no if checked yes it displays on label
2: are u a painter radio btn yes radiobtn no if checked yes it displays on label like "gamer + painter" or "no gamer+painter" or "no painter + gamer" or "no painter + no gamer"
and so on
here is my code when i checked the first radio button it moves automatically to last radio button
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
If RadioButton1.Checked = True Then
Label26.Text = "Heart problem"
Else
RadioButton2.Checked = False
Label26.Text = "No Heart Problem"
End If
If RadioButton4.Checked = True Then
Label26.Text = "Heart Stroke"
Else
RadioButton3.Checked = True
Label26.Text = "No Heart Stroke"
End If
If RadioButton6.Checked = True Then
Label26.Text = "Epilepsy"
Else
RadioButton5.Checked = True
Label26.Text = "No Epilepsy"
End If
If RadioButton8.Checked = True Then
Label26.Text = "Pregnant"
Else
RadioButton7.Checked = True
Label26.Text = "No Prgnancy"
End If
If RadioButton10.Checked = True Then
Label26.Text = "Diabetes"
Else
RadioButton9.Checked = True
Label26.Text = "No Diabetes"
End If
If RadioButton12.Checked = True Then
Label26.Text = "Chest Pain"
Else
RadioButton11.Checked = True
Label26.Text = "No Chest Pain"
End If
If RadioButton14.Checked = True Then
Label26.Text = "Bone & Joint Pain"
Else
RadioButton13.Checked = True
Label26.Text = "No Bone and Joint Pain"
End If
If RadioButton16.Checked = True Then
Label26.Text = "Blood Pressure Problem"
Else
RadioButton15.Checked = True
Label26.Text = "No Blood Pressure Problem"
End If
If RadioButton18.Checked = True Then
Label26.Text = "High Cholesterol problem"
Else
RadioButton17.Checked = True
Label26.Text = "No High Cholesterol problem"
End If
If RadioButton20.Checked = True Then
Label26.Text = "High Cholesterol problem"
Else
RadioButton19.Checked = True
Label26.Text = "No High Cholesterol problem"
End If
If RadioButton22.Checked = True Then
Label26.Text = "Female Above 32 Years"
Else
RadioButton21.Checked = True
Label26.Text = "Less Than 32 Years"
End If
If RadioButton24.Checked = True Then
Label26.Text = "Exercising Less Then 1 Hour per Week"
Else
RadioButton23.Checked = True
Label26.Text = "Exercising More Then 1 Hour per week"
End If
End Sub
like
1: are u a gamer radio btn yes radiobtn no if checked yes it displays on label
2: are u a painter radio btn yes radiobtn no if checked yes it displays on label like "gamer + painter" or "no gamer+painter" or "no painter + gamer" or "no painter + no gamer"
and so on
here is my code when i checked the first radio button it moves automatically to last radio button
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
If RadioButton1.Checked = True Then
Label26.Text = "Heart problem"
Else
RadioButton2.Checked = False
Label26.Text = "No Heart Problem"
End If
If RadioButton4.Checked = True Then
Label26.Text = "Heart Stroke"
Else
RadioButton3.Checked = True
Label26.Text = "No Heart Stroke"
End If
If RadioButton6.Checked = True Then
Label26.Text = "Epilepsy"
Else
RadioButton5.Checked = True
Label26.Text = "No Epilepsy"
End If
If RadioButton8.Checked = True Then
Label26.Text = "Pregnant"
Else
RadioButton7.Checked = True
Label26.Text = "No Prgnancy"
End If
If RadioButton10.Checked = True Then
Label26.Text = "Diabetes"
Else
RadioButton9.Checked = True
Label26.Text = "No Diabetes"
End If
If RadioButton12.Checked = True Then
Label26.Text = "Chest Pain"
Else
RadioButton11.Checked = True
Label26.Text = "No Chest Pain"
End If
If RadioButton14.Checked = True Then
Label26.Text = "Bone & Joint Pain"
Else
RadioButton13.Checked = True
Label26.Text = "No Bone and Joint Pain"
End If
If RadioButton16.Checked = True Then
Label26.Text = "Blood Pressure Problem"
Else
RadioButton15.Checked = True
Label26.Text = "No Blood Pressure Problem"
End If
If RadioButton18.Checked = True Then
Label26.Text = "High Cholesterol problem"
Else
RadioButton17.Checked = True
Label26.Text = "No High Cholesterol problem"
End If
If RadioButton20.Checked = True Then
Label26.Text = "High Cholesterol problem"
Else
RadioButton19.Checked = True
Label26.Text = "No High Cholesterol problem"
End If
If RadioButton22.Checked = True Then
Label26.Text = "Female Above 32 Years"
Else
RadioButton21.Checked = True
Label26.Text = "Less Than 32 Years"
End If
If RadioButton24.Checked = True Then
Label26.Text = "Exercising Less Then 1 Hour per Week"
Else
RadioButton23.Checked = True
Label26.Text = "Exercising More Then 1 Hour per week"
End If
End Sub