mardi 15 mai 2018

how to hide radiobutton if other radiobutton has a specific text in it?

I am working on a project at home that is basically a multiple choice quiz, and the answers to the radio buttons come with a string method (The questions come inside a pictureBox) and I've noticed once you answer the last question and theres no more questions to answer, the program crashes.

I'm trying to prevent this by adding 1 more picture that says something like "QUIZ OVER" and hiding the radioButtons, but I do not know how to hide the radioButtons at a specific circumstance like that.

I've tried this type of code but it did not work:

if (radioButton1.Text("Answer");
{
radioButton1.Hide;
radioButton2.Hide;
radioButton3.Hide;
}

Aucun commentaire:

Enregistrer un commentaire