473,407 Members | 2,326 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,407 software developers and data experts.

How do menu list with one check

How do I create a submenu so that I can only check ONE of the values?

Example:
Menu
--> Color SubMenu
--> Red Value 1
--> Yellow Value 2
--> Green Value 3

Thanks....
Jan 17 '06 #1
7 3975

VB Programmer wrote:
How do I create a submenu so that I can only check ONE of the values?

Example:
Menu
--> Color SubMenu
--> Red Value 1
--> Yellow Value 2
--> Green Value 3

Thanks....


You have to unclick the other items yourself once on is selected.

Chris
Jan 17 '06 #2
"I Don't Like Spam" <no@spam.com> schrieb:
How do I create a submenu so that I can only check ONE of the values?

Example:
Menu
--> Color SubMenu
--> Red Value 1
--> Yellow Value 2
--> Green Value 3

Thanks....


You have to unclick the other items yourself once on is selected.


You can simplify this by storing the selected option in a private variable
of type 'MenuItem', for example, then uncheck the previously checked item if
another item is clicked and store the newly checked item in the variable.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Jan 17 '06 #3
Thanks, as usual!!! :)

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:O2**************@tk2msftngp13.phx.gbl...
"I Don't Like Spam" <no@spam.com> schrieb:
How do I create a submenu so that I can only check ONE of the values?

Example:
Menu
--> Color SubMenu
--> Red Value 1
--> Yellow Value 2
--> Green Value 3

Thanks....


You have to unclick the other items yourself once on is selected.


You can simplify this by storing the selected option in a private variable
of type 'MenuItem', for example, then uncheck the previously checked item
if another item is clicked and store the newly checked item in the
variable.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Jan 18 '06 #4
Wasn't this feature built into versions of VB previous to VS.NET 05? I seem
to remember the ability to indicate that a particular set of menu options
was mutually exclusive i.e. a dot would appear next to the single item
selected.

I can live with the fact that I now have to code something that used to be
done with setting control properties, but what irks me is that the visual
interface is no longer consistent. Checks are for non-mutually exclusive
options. Dots are for mutually exclusive options. This used to be true
outside and inside a menu. But with the apparent removal of this feature,
the interface standard is no longer uniformly applied.

Using the example below, in VS.NET 05, if I see a check next to Yellow, I
don't automatically know that I'm only allowed to select one option.
Depending on the application, it may not be intuitive that you can't select
any combination of the options.

Yeah, I guess I could always write my own control, but that's not the point.
It seems like MS has abandoned applying one of the most fundamental GUI
principles when it comes to the Menu. Am I the only one bothered by this?

Mitchell S. Honnert
www.UltraID3Lib.com
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:O2**************@tk2msftngp13.phx.gbl...
"I Don't Like Spam" <no@spam.com> schrieb:
How do I create a submenu so that I can only check ONE of the values?

Example:
Menu
--> Color SubMenu
--> Red Value 1
--> Yellow Value 2
--> Green Value 3

Thanks....


You have to unclick the other items yourself once on is selected.


You can simplify this by storing the selected option in a private variable
of type 'MenuItem', for example, then uncheck the previously checked item
if another item is clicked and store the newly checked item in the
variable.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Jan 18 '06 #5

Mitchell S. Honnert wrote:
Wasn't this feature built into versions of VB previous to VS.NET 05? I seem
to remember the ability to indicate that a particular set of menu options
was mutually exclusive i.e. a dot would appear next to the single item
selected.


For a moment I thought you had just made this up :) But I checked the
the excerpt from 'The Windows User Experience', as found in the MSDN
Library October 2001, and indeed it is specified that you can have
option-group-like menu items. Can't think of anywhere I've ever seen
one. *However* - I don't recall ever being able to create these
directly in VB, and indeed there's no support for this concept in the
VB6 Menu Editor. So I don't know if you ever could in VB.

However (again), I did find in the .NET Framework the
MenuItem.RadioCheck property, which tells a menu item to display a
radio button (not a check mark) in response to the value of the Checked
property. This (combines with the manual exclusivity coding) gives the
behaviour you seek.

--
Larry Lard
Replies to group please

Jan 18 '06 #6

VB Programmer wrote:
How do I create a submenu so that I can only check ONE of the values?

Example:
Menu
--> Color SubMenu
--> Red Value 1
--> Yellow Value 2
--> Green Value 3


Echoing my post elsethread, in addition to the other replies, note that
you can set MenuItem.RadioChecked to make the menu items display a dot
rather than a tick mark.

--
Larry Lard
Replies to group please

Jan 18 '06 #7
> Can't think of anywhere I've ever seen one.
You can find an example of the "radio menu item" in Outlook Express (which,
not too coincidentally, I'm using right now as my newsreader.)

View
Current View
Show All Message
Hide Read Messages
Show Downloaded Messages
Hide Read or Ignored Message
However (again), I did find in the .NET Framework the MenuItem.RadioCheck
property, which tells a menu item to display a radio button (not a check
mark)
in response to the value of the Checked property. A ha! But I'm not using the superseded MenuItem. I'm using the new
ToolStripMenuItem.

From the Help entry on MenuItem...

"Represents an individual item that is displayed within a MainMenu or
ContextMenu. Although ToolStripMenuItem replaces and adds functionality to
the MenuItem control of previous versions, MenuItem is retained for both
backward compatibility and future use if you choose."

So, it still appears that if you want to use the "latest and greatest" menu
controls in VS.NET, you lose the ability to display a check without
overriding the control.

Incidentally, if you look in the Outlook 2003 (and probably other MS Office
03 apps), you see that the View \ Arrange By menu items only use checks even
though they are mutually exclusive. So, if we're supposed to look towards
MS's own products as guidance for GUI design, it truly does appear as if
they've abandoned the principle.

Bummer.

- Mitchell S. Honnert

"Larry Lard" <la*******@hotmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Mitchell S. Honnert wrote:
Wasn't this feature built into versions of VB previous to VS.NET 05? I
seem
to remember the ability to indicate that a particular set of menu options
was mutually exclusive i.e. a dot would appear next to the single item
selected.


For a moment I thought you had just made this up :) But I checked the
the excerpt from 'The Windows User Experience', as found in the MSDN
Library October 2001, and indeed it is specified that you can have
option-group-like menu items. Can't think of anywhere I've ever seen
one. *However* - I don't recall ever being able to create these
directly in VB, and indeed there's no support for this concept in the
VB6 Menu Editor. So I don't know if you ever could in VB.

However (again), I did find in the .NET Framework the
MenuItem.RadioCheck property, which tells a menu item to display a
radio button (not a check mark) in response to the value of the Checked
property. This (combines with the manual exclusivity coding) gives the
behaviour you seek.

--
Larry Lard
Replies to group please

Jan 18 '06 #8

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

Similar topics

2
by: zapazap | last post by:
Dear Snake Charming Gurus, (Was: http://mail.python.org/pipermail/python-list/2004-January/204454.html) First, a thank you to Tim Golden, Thomas Heller, and Mark Hammond for your earlier help...
4
by: JesusFreak | last post by:
From: us_traveller@yahoo.com (JesusFreak) Newsgroups: microsoft.public.scripting.jscript Subject: toolbar script problem NNTP-Posting-Host: 192.92.126.136 Recently, I downloaded the following...
2
by: RWD | last post by:
I am trying to figure out how to change the target frame in my hyperlink on a DHTML menu. The menu is in one frame and the target frame is called "main" The code is below: Thanks in advance...
4
by: Yuk Cheng | last post by:
<<<start index.htm>>> <html> <head> <script> function perform(action){ } </script> </head>
13
by: Matthew Hagston | last post by:
Trying to do some updating and beyond frustrations with making it compatibal with Mac's I am primarily done. Biggest problem I am having now is with Opera not displaying the menu. works fine in IE,...
0
by: benfly08 | last post by:
Hi, I used SWT to develop an windows application. In the application there is a dynamic created popup menu. The dynamic part is that i will pass a list of name to be a submenu of one menu item....
23
by: kigoobe | last post by:
Hi friends, I'm having a menu like this - http://www.kigoobe.com/offshoring/bugs/javascript/treeMenuCheckToggle.gif that I've fetched from the database, using recursive function, where data...
4
by: TechnoAtif | last post by:
Hi ALL I have entered some array values using checkboxes into mysql database through a form. Next iam creating a searchpage where all those cateogories inserted through checkboxes has to be...
13
by: PetterL | last post by:
I writing a program where I read menu items from a file. But I have problem when I click an menu item i want it to mark that one as checked but I cant access the menu object of that item to see...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
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...
0
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,...

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.