473,387 Members | 2,436 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

RadioButton

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
6 9277
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
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
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
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
>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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: VK | last post by:
Hi! What I'm missing in following code? Cannot get the values of radiobuttons. Starting only one class (GetVariant), it works. When I put two classes together, it doesn't. Regards, VK from...
11
by: William Gill | last post by:
I am placing radiobuttons in a 4 X 4 matrix (using loops) and keep references to them in a 2 dimensional list ( rBtns ). It works fine, and I can even make it so only one button per column can be...
0
by: rodrigo | last post by:
I have a Asp.net table control that I dynamically add rows from a SQL database. Inside the table, I add radiobuttons and they all have different ID numbers according to BindChain() Looking In...
3
by: sofie | last post by:
Hello all, I use the following javascript function in a html document to set the level of one of eight available radiobuttons. The line that's commented out works fine under IE, but I need to...
2
by: JeffFinnan | last post by:
<form name=form1> Load in Viewer Window: <input name="radiobutton" type="radio" value="1" checked onClick="1"> 1&nbsp;&nbsp;&nbsp; <input type="radio" name="radiobutton" value="2" onClick="2">...
1
by: Dmitry V. Markin | last post by:
Good day! Here is my problem: I need to have a radiobutton column in my DataGrid for a representation of a bool column, where only row can be checked at one time(only one value in bool column...
3
by: dave | last post by:
I have half a dozen web form radio buttons on a web form. Each of them is set to postback=true. However, if for instance radiobutton1 is already selected and the user selects it again, it performs...
4
by: Igor | last post by:
RadioButton have property Checked (true or false). If I make RadioButtons with code, without drawing by mouse than I have problems. I write like this: Dim rb(0 To 2) As RadioButton Dim n As...
8
by: =?Utf-8?B?UmljaA==?= | last post by:
If you enclose a group of radiobuttons (option buttons in MS Access) in an option group control (a frame control) in Access -- the frame control will return the index of the option button that is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.