R
Rob W
Greetings,
I originally had THREE for/each loops to cycle around each toolstripitem for
of the three toolstripmenuitem.dropdownlists.
I then thought could I use an array of toolstripitemcollection to include
all contents of the toolstripmenuitem.dropdownlists.
Dim myThreeMenuItems() As ToolStripItemCollection =
{myParent.EditToolStripMenuItem.DropDownItems,
myParent.ToolsToolStripMenuItem.DropDownItems,
myParent.WindowsToolStripMenuItem.DropDownItems}
Note: Myparent is due to this being an MDI application.
Dim myMenuItem As ToolStripItem
For Each myEditMenuItem In myThreeMenuItems
myMenuItem.Enabled = False
Next
How can this be achieved?
I get confused with the current error as it states the for each loop is
invalid due to differing types involved (menuitem vs itemcollection).
Surely an Item can reference an item collection?
Thanks
Rob
I originally had THREE for/each loops to cycle around each toolstripitem for
of the three toolstripmenuitem.dropdownlists.
I then thought could I use an array of toolstripitemcollection to include
all contents of the toolstripmenuitem.dropdownlists.
Dim myThreeMenuItems() As ToolStripItemCollection =
{myParent.EditToolStripMenuItem.DropDownItems,
myParent.ToolsToolStripMenuItem.DropDownItems,
myParent.WindowsToolStripMenuItem.DropDownItems}
Note: Myparent is due to this being an MDI application.
Dim myMenuItem As ToolStripItem
For Each myEditMenuItem In myThreeMenuItems
myMenuItem.Enabled = False
Next
How can this be achieved?
I get confused with the current error as it states the for each loop is
invalid due to differing types involved (menuitem vs itemcollection).
Surely an Item can reference an item collection?
Thanks
Rob