|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How do menu list with one checkHow 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.... VB Programmer wrote:
> How do I create a submenu so that I can only check ONE of the values? You have to unclick the other items yourself once on is selected.> > Example: > Menu > --> Color SubMenu > --> Red Value 1 > --> Yellow Value 2 > --> Green Value 3 > > Thanks.... > > Chris "I Don't Like Spam" <no@spam.com> schrieb: You can simplify this by storing the selected option in a private variable >> 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. 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/> Thanks, as usual!!! :)
Show quoteHide quote "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message news:O2BzAr7GGHA.3100@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/> 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 Show quoteHide quote "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message news:O2BzAr7GGHA.3100@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/> Mitchell S. Honnert wrote:
> Wasn't this feature built into versions of VB previous to VS.NET 05? I seem For a moment I thought you had just made this up :) But I checked the> 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. 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 > 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 A ha! But I'm not using the superseded MenuItem. I'm using the new >property, which tells a menu item to display a radio button (not a check >mark) >in response to the value of the Checked property. 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 Show quoteHide quote "Larry Lard" <larryl***@hotmail.com> wrote in message news:1137602618.513217.322020@f14g2000cwb.googlegroups.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 > VB Programmer wrote:
> How do I create a submenu so that I can only check ONE of the values? Echoing my post elsethread, in addition to the other replies, note that> > Example: > Menu > --> Color SubMenu > --> Red Value 1 > --> Yellow Value 2 > --> Green Value 3 you can set MenuItem.RadioChecked to make the menu items display a dot rather than a tick mark. -- Larry Lard Replies to group please
ShellExecute in VB2005
How to minimize to system tray ? VS 2003 Keep software running The Irish fada (áéíóú/ÁÉÍÓÚ) and encryption/decryption problem! How to create a "DataSource" & "Items" properties on Custom Combob Binding sources question in Vs2005 Working with structures and the New keyword Custom Property Detect Remote Shutdown Alignment problem displaying .txt file in window's textbox? |
|||||||||||||||||||||||