|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
MenuStrip Submenu ItemsEnable/Disable Submenu items within a MenuStrip. File -Open -Save .. .. I know how to do it in a ContextMenuStrip as - ContextMenuStrip1.Items.Item(Name).Enabled = False but MenuStrip1.Items.Item("Open").Enabled = False doesn't work. Any help appreciated. ShaneO There are 10 kinds of people - Those who understand Binary and those who don't. Hello ShaneO,
> Probably a stupid question, but I can't seem to find how to Each MenuStrip item is declared as it's own entity. By default it takes the > Enable/Disable Submenu items within a MenuStrip. > > File > -Open > -Save > . > . > I know how to do it in a ContextMenuStrip as - > > ContextMenuStrip1.Items.Item(Name).Enabled = False > > but MenuStrip1.Items.Item("Open").Enabled = False doesn't work. name of the Text and "ToolStripMenuItem". In your case, your object may be named "OpenToolStripMenuItem". You can simply set OpenToolStripMenuItem.Enabled=False. Jim Wooley Jim Wooley wrote:
Show quoteHide quote > Hello ShaneO, Thank-you very much for your assistance. As I thought, it was stupid > >> Probably a stupid question, but I can't seem to find how to >> Enable/Disable Submenu items within a MenuStrip. >> >> File >> -Open >> -Save >> . >> . >> I know how to do it in a ContextMenuStrip as - >> >> ContextMenuStrip1.Items.Item(Name).Enabled = False >> >> but MenuStrip1.Items.Item("Open").Enabled = False doesn't work. > > > Each MenuStrip item is declared as it's own entity. By default it takes > the name of the Text and "ToolStripMenuItem". In your case, your object > may be named "OpenToolStripMenuItem". You can simply set > OpenToolStripMenuItem.Enabled=False. > > Jim Wooley > > Hello Jim, question, but I just couldn't see the forest for the trees! (You wouldn't believe how long I spent on this, and all the Googling in the world didn't seem to help!!!) Thanks again. ShaneO There are 10 kinds of people - Those who understand Binary and those who don't.
Try/Catch question
Type.GetType with two projects Threading IsNumeric Bug or misunderstanding? Simple but difficult to find solution for loading HTML into object problem with localization SOAP with Attachments Installing a .net windows service DB Connectivity Help referencing a variable in HTML of an aspx page |
|||||||||||||||||||||||