473,795 Members | 2,391 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.c om
http://www.dotnetmonster.com/Uwe/For...sharp/200605/1
May 12 '06 #1
6 9294
Mel
put the radiobutton inside a groupbox
"Radiobutto n via DotNetMonster.c om" <u21637@uwe> wrote in message
news:602395d788 141@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.c om
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.c om
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.c om
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.Win dows.Forms.Form
{

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

//set Text of the RadioButtons
radiobutton1.Te xt="RadioButto n 1";
radiobutton2.Te xt="RadioButto n 2";
radiobutton3.Te xt="RadioButto n 3";
//set Text of the Button
button.Text="Re set";
//set EventHandler for the Button
button.Click+=n ew EventHandler(Bu tton_Click);
//set Location of the RadioButtons
radiobutton1.Lo cation=new Point(34,5);
radiobutton2.Lo cation=new Point(34,26);
radiobutton3.Lo cation=new Point(34,47);
//set Location of the Button
button.Location =new Point(34,68);
//add the RadioButtons to the Form
Controls.Add(ra diobutton1);
Controls.Add(ra diobutton2);
Controls.Add(ra diobutton3);
//add the Button to the Form
Controls.Add(bu tton);
}
//Button_Click
void Button_Click(ob ject a,EventArgs b)
{
radiobutton1.Ch ecked=false;
radiobutton2.Ch ecked=false;
radiobutton3.Ch ecked=false;
}
//Main
[STAThreadAttrib ute]
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.Win dows.Forms.Form
{

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

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

//constructor
Form()
{

//set Text of the RadioButtons
radiobutton1.Te xt="RadioButto n 1";
radiobutton2.Te xt="RadioButto n 2";
radiobutton3.Te xt="RadioButto n 3";

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

//set EventHandler for the Button
button.Click+=n ew EventHandler(Bu tton_Click);

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

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

//add the RadioButtons to the Form
Controls.Add(ra diobutton1);
Controls.Add(ra diobutton2);
Controls.Add(ra diobutton3);

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

//Button_Click
void Button_Click(ob ject a,EventArgs b)
{
radiobutton1.Ch ecked=false;
radiobutton2.Ch ecked=false;
radiobutton3.Ch ecked=false;
}

//Main
[STAThreadAttrib ute]
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
2852
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 Tkinter import * class GetVariant: def __init__(self): self.root = Tk()
11
7874
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 selected, by assigning each column to an intVar. In many languages a radiobutton has a property that can be directly read to see if it is selected on unselected. Tkinter radiobuttons don't seem to have any such property. Is there any way to...
0
4139
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 BindChain() Sub for the line: AddHandler Rb.CheckedChanged, AddressOf BindAssembly_Click
3
36186
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 rewrite it so that it's W3C compliant. Reading through earlier messages I concluded I should go with getElementById but this doesn't work. What am I doing wrong? Your help is much appreciated.
2
1874
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"> 2&nbsp;&nbsp;&nbsp; <input type="radio" name="radiobutton" value="3" onClick="3"> 3&nbsp;&nbsp;&nbsp; <input type="radio" name="radiobutton" value="4" onClick="4"> 4
1
4048
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 can be true). So I've created a class inheriting from DataGridColumnStyle and added the following code to the class: protected RadioButton rb ; ....
3
7286
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 a postback. I only want to do a postback if the value of the radiobutton is changed. What is the best method to accomplish this? thx dave
4
1610
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 Integer For n = 0 To 2 rb(n) = New RadioButton rb(n).Text = "Text: " + CStr(n)
8
44043
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 checked. In VB.Net if I enclose a group of radiobuttons in a groupbox control - I get the single checked radiobutton behavior, but the groupbox does not seem to return the index of the checked radiobutton. Is there a way to get the groupbox...
0
9672
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9519
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10214
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10001
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9042
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.