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

Menu items as radio buttons

Hello,

Is there a way to group menu items so they act like radio buttons -
that is when one is checked the others in the same group are unchecked
- I'm looking for a property to group menu items but can't see it.
Delphi's VCL has GroupIndex for example.

Ta

Ray

Nov 5 '07 #1
4 6827
Ray,

You would have to implement this yourself. The only thing that the
MenuItem class has to help with this is the RadioCheck property, to indicate
that a menu item that is checked is mutually exclusive from the others. You
still have to manually set the checked state of the other menu items in your
group.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<RB***********@gmail.comwrote in message
news:11**********************@19g2000hsx.googlegro ups.com...
Hello,

Is there a way to group menu items so they act like radio buttons -
that is when one is checked the others in the same group are unchecked
- I'm looking for a property to group menu items but can't see it.
Delphi's VCL has GroupIndex for example.

Ta

Ray

Nov 5 '07 #2
RB***********@gmail.com wrote:
Hello,

Is there a way to group menu items so they act like radio buttons -
that is when one is checked the others in the same group are unchecked
- I'm looking for a property to group menu items but can't see it.
Delphi's VCL has GroupIndex for example.
I don't believe there's anything of the sort in .net, though it isn't
hard to implement -- just use a generic handler for all the buttons, and
do something like:

private void emulateRadio_click(object sender, EventArgs e)
{
NumberOneToolStripButton.Enabled = (sender ==
NumberOneToolStripButton);
NumberTwoToolStripButton.Enabled = (sender ==
NumberTwoToolStripButton);
NumberThreeToolStripButton.Enabled = (sender ==
NumberThreeToolStripButton);
}
Chris.
Nov 6 '07 #3
Chris Shepherd wrote:
private void emulateRadio_click(object sender, EventArgs e)
{
NumberOneToolStripButton.Enabled = (sender ==
NumberOneToolStripButton);
NumberTwoToolStripButton.Enabled = (sender ==
NumberTwoToolStripButton);
NumberThreeToolStripButton.Enabled = (sender ==
NumberThreeToolStripButton);
}
Chris.
Replacing Enabled with Checked, of course...

/Steps away from usenet before drinking coffee. :)

Chris.
Nov 6 '07 #4
On Nov 5, 9:06 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
Ray,

You would have to implement this yourself. The only thing that the
MenuItem class has to help with this is the RadioCheck property, to indicate
that a menu item that is checked is mutually exclusive from the others. You
still have to manually set the checked state of the other menu items in your
group.

--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com

<RBrowning1...@gmail.comwrote in message

news:11**********************@19g2000hsx.googlegro ups.com...
Hello,
Is there a way to group menu items so they act likeradiobuttons -
that is when one is checked the others in the same group are unchecked
- I'm looking for a property to group menu items but can't see it.
Delphi's VCL has GroupIndex for example.
Ta
Ray- Hide quoted text -

- Show quoted text -
Nicholas,

I am using VS 2005 and I don't see a property called RadioCheck - what
am I missing?

Ta

Ray

Nov 6 '07 #5

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

Similar topics

3
by: Dot net work | last post by:
Is it possible to have a radiobuttonlist control appear on a webform without any radio buttons checked to begin with? I would really like to make sure that the user specifically chooses a radio...
3
by: Ferret Face | last post by:
Hello, I have a web page that gets the user to select items from a list of options. This list is a set of independant Radio Buttons. I did not use a Radio Button List because I wanted the...
7
by: Martijn Mulder | last post by:
How can I put a set of Radio Buttons in a Menu? A bullet list of items where selecting one automatically unselects the others. Thanks
3
by: TORQUE | last post by:
Hi How can I make a radio button create an action like enabling or disabling a delete button in a form? TIA TORQUE
2
by: bflyrose | last post by:
Hi I need some help I am trying to connect my radio buttons to show prices in the listbox with the name of the movie selected this is what I have so far my problem is I don't know how to get the...
2
by: Kusank | last post by:
I have 8 radio buttons that when they are selected will cause the drop down menu to change so that the sizes in the menu are correct, this works prefectly fine. But the issue I am having is once the...
11
by: Twayne | last post by:
Hi, Newbie to PHP here, no C or other relevant background, so pretty niave w/r to the nuances etc. but I think this is pretty basic. XP Pro, SP2+, PHP 4.4.7, XAMPP Local Apache Server...
3
by: DragonLord | last post by:
Ok here is the situation in detail. Single form with multiple items on it, 4 of which are panls that contain radio butons. Each panel loads it's radio buttons from a list of items in a sql...
2
by: FBIagent | last post by:
Hi, I want to create two radio buttons which can select gender (V for man and M for women). I've read Staring from scratch: 1. Click and turn off the Control Wizards from the menu (icon...
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
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.