RadioButton VS-E trouble

I do not understand Radio Buttons. How do I say some like:

1
2
3
4
5
6
7
8
9
10

private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) 
			 {

				 if (radioButton == true) //or been clicked on
				 {
				      textBox1->Text = "";
				 }
			 }


I don't get what the RadioButtons are supposed to equal or be compared to.
Okay I found an answer:

private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
{

if (radioButton1->Checked)
{
textBox1->Text = "";
}
}


Now.... How do I remove the Check?
probably there is a function like SetCheck or similar.



P.S why do you persist on posting C++/CLI questions in this forum??
This is the Windows Programming forum. Its there a Forum better suited?
Try the same clocked function but with a parameter of false;


radioButton1->Checked(false); //uncheck button


Edited - typo
Last edited on
Thanks, that put me in the right direction, I got the radioButton1 to switch from checked->unchecked, but it only worked by button_click

1
2
3
4
5
6
7
8
9
10
11
12
13

private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) 
			 {
				 if (radioButton1->Checked)
				 {
					 radioButton1->Checked = (false);
				 }

				 else
				 {
					 radioButton1->Checked = (true);
				 }


Now that I'm here, I think I can get it going, Thanks!
Topic archived. No new replies allowed.