By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,983 Members | 2,049 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,983 IT Pros & Developers. It's quick & easy.

RadioButton

P: n/a
i need help with radiobuttons.

i am useing 1button and 2 radiobuttons i am trying to make it so when u
select a radiobutton and hit button1 it will clear radiobuttons 1 and 2.

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...sharp/200605/1
May 12 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Mel
put the radiobutton inside a groupbox
"Radiobutton via DotNetMonster.com" <u21637@uwe> wrote in message
news:602395d788141@uwe...
i need help with radiobuttons.

i am useing 1button and 2 radiobuttons i am trying to make it so when u
select a radiobutton and hit button1 it will clear radiobuttons 1 and 2.

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...sharp/200605/1

May 12 '06 #2

P: n/a
Mel wrote:
put the radiobutton inside a groupbox
i need help with radiobuttons.

i am useing 1button and 2 radiobuttons i am trying to make it so when u
select a radiobutton and hit button1 it will clear radiobuttons 1 and 2.


not really what i was looking.

--
Message posted via http://www.dotnetmonster.com
May 12 '06 #3

P: n/a
C# Dragon wrote:
put the radiobutton inside a groupbox
i need help with radiobuttons.

i am useing 1button and 2 radiobuttons i am trying to make it so when u
select a radiobutton and hit button1 it will clear radiobuttons 1 and 2.


not really what i was looking.


sorry it wasn't what you where looking for.

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...sharp/200605/1
May 12 '06 #4

P: n/a
Mel wrote:
put the radiobutton inside a groupbox
i need help with radiobuttons.

i am useing 1button and 2 radiobuttons i am trying to make it so when u
select a radiobutton and hit button1 it will clear radiobuttons 1 and 2.


thanks but that isn't what i needed

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...sharp/200605/1
May 12 '06 #5

P: n/a
>i need help with radiobuttons.

i am useing 1button and 2 radiobuttons i am trying to make it so when u
select a radiobutton and hit button1 it will clear radiobuttons 1 and 2.



//namespace RadioButton
namespace RadioButton
{

using System;
using System.Drawing;
using System.Windows.Forms;
//class Form
class Form:System.Windows.Forms.Form
{

//create 3 RadioButtons
RadioButton radiobutton1=new RadioButton();
RadioButton radiobutton2=new RadioButton();
RadioButton radiobutton3=new RadioButton();
//create a Button
Button button=new Button();
//constructor
Form()
{

//set Text of the RadioButtons
radiobutton1.Text="RadioButton 1";
radiobutton2.Text="RadioButton 2";
radiobutton3.Text="RadioButton 3";
//set Text of the Button
button.Text="Reset";
//set EventHandler for the Button
button.Click+=new EventHandler(Button_Click);
//set Location of the RadioButtons
radiobutton1.Location=new Point(34,5);
radiobutton2.Location=new Point(34,26);
radiobutton3.Location=new Point(34,47);
//set Location of the Button
button.Location=new Point(34,68);
//add the RadioButtons to the Form
Controls.Add(radiobutton1);
Controls.Add(radiobutton2);
Controls.Add(radiobutton3);
//add the Button to the Form
Controls.Add(button);
}
//Button_Click
void Button_Click(object a,EventArgs b)
{
radiobutton1.Checked=false;
radiobutton2.Checked=false;
radiobutton3.Checked=false;
}
//Main
[STAThreadAttribute]
public static void Main(string[] args)
{
Application.Run(new Form());
}
}
}

May 12 '06 #6

P: n/a
Martijn Mulder wrote:
i need help with radiobuttons.

i am useing 1button and 2 radiobuttons i am trying to make it so when u
select a radiobutton and hit button1 it will clear radiobuttons 1 and 2.


//namespace RadioButton
namespace RadioButton
{

using System;
using System.Drawing;
using System.Windows.Forms;

//class Form
class Form:System.Windows.Forms.Form
{

//create 3 RadioButtons
RadioButton radiobutton1=new RadioButton();
RadioButton radiobutton2=new RadioButton();
RadioButton radiobutton3=new RadioButton();

//create a Button
Button button=new Button();

//constructor
Form()
{

//set Text of the RadioButtons
radiobutton1.Text="RadioButton 1";
radiobutton2.Text="RadioButton 2";
radiobutton3.Text="RadioButton 3";

//set Text of the Button
button.Text="Reset";

//set EventHandler for the Button
button.Click+=new EventHandler(Button_Click);

//set Location of the RadioButtons
radiobutton1.Location=new Point(34,5);
radiobutton2.Location=new Point(34,26);
radiobutton3.Location=new Point(34,47);

//set Location of the Button
button.Location=new Point(34,68);

//add the RadioButtons to the Form
Controls.Add(radiobutton1);
Controls.Add(radiobutton2);
Controls.Add(radiobutton3);

//add the Button to the Form
Controls.Add(button);
}

//Button_Click
void Button_Click(object a,EventArgs b)
{
radiobutton1.Checked=false;
radiobutton2.Checked=false;
radiobutton3.Checked=false;
}

//Main
[STAThreadAttribute]
public static void Main(string[] args)
{
Application.Run(new Form());
}
}
}


thx alot that helped ^_^

--
Message posted via http://www.dotnetmonster.com
May 13 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.