473,396 Members | 1,895 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,396 software developers and data experts.

GroupBox Selected

Hi

I have a Windows GroupBox (m_groupBox) on a form which acts as a filter and
contains 26 filter radiobuttons (m_radioButtonA through m_radioButtonZ).

How can I check in code which radiobutton has been selected? There does not
seem to be a property in the groupBox for this.

Thanks
Nov 17 '05 #1
1 7480
Use the following code,

for(int i=0;i<groupBox1.Controls.Count;i++)
{
if (((RadioButton) groupBox1.Controls[i]).Checked)
MessageBox.Show(((RadioButton) groupBox1.Controls[i]).Text);
}

--
Regards,
Amal [MCP, MCS]
http://geocities.com/techsharing
"jez123456" wrote:
Hi

I have a Windows GroupBox (m_groupBox) on a form which acts as a filter and
contains 26 filter radiobuttons (m_radioButtonA through m_radioButtonZ).

How can I check in code which radiobutton has been selected? There does not
seem to be a property in the groupBox for this.

Thanks

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: PawelR | last post by:
Hello Group, I've problem with get number of Items in groupBox. I've in my apps groupBox with over 20 radioButton. 1. How read who radioButton is checked? 2. How run function after change...
0
by: Mark Johnson | last post by:
Sometimes Controls that have been added to a GroupBox do not show up. What I am doing : 1) I am not using the designer, but create all the Controls per hand: groupBoxProdukt_01 = new...
0
by: Renee | last post by:
Hi there, does any one know how to create context sensitive help for Groupbox control with HelpProvider class? I can create context sensitive help for any control easily except for Groupbox. ...
1
by: MikeY | last post by:
I'm trying to find a way for changing the thickness of the groupbox borders. I've searched on this site but can't seem to find anything of this subject. Does anyone have a suggestion. Thanks in...
4
by: TJS | last post by:
I get this error at time of compiling my class code what's missing ?? =================== error ============================= Me.groupBox1 = New GroupBox ~~~~~~~~~~~~~ C:\Documents and...
2
by: Rich | last post by:
Hello, If I place a groupbox control (gb1) on a form and add 2 radion buttons where rad1 represents a value of 1 of rad2 a value of 2 --- when I click on rad1 I want a messagebox to show the...
8
by: johnmmcparland | last post by:
Hi all, my program is trying to add group boxes with radio buttons at run time. While at one point it was able to draw the group boxes without the radio buttons, now it encounters problems just...
2
by: K Forester | last post by:
Hi, I am a complete beginner and need help with a form. There are 2 group boxes, each containing 3 radio buttons on my form. I'd like to write a subroutine in a module that checks to be sure that...
8
by: Steve | last post by:
Hi All Is there a way to change the colour of a Groupbox border in VB.net 2005 I want to change it to white Can it be done in the onpaint event? Regards Steve
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: 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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.