Hello,
I have a vb.net form that I've added a StatusStrip at the bottom. On that
StatusStrip I've added a DropDownButton on which I've added a Menu
containing 4 sub Items
What I am trying to do is cycle through the Menu's subitems one by one and
uncheck or check the items instead of setting them all individually.
So, here's what I want to avoid:
Private Sub SubToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles SubToolStripMenuItem1.Click
SubToolStripMenuItem.Checked = False
SubToolStripMenuItem1.Checked = False
SubToolStripMenuItem2.Checked = False
SubToolStripMenuItem3.Checked = True
End Sub
My DropDownButton is called: ToolStripDropDownButton1
My Menu that contains the 4 sub items is called: MyToolStripMenuItem
My sub items are: SubToolStripMenuItem, SubToolStripMenuItem1,
SubToolStripMenuItem2, SubToolStripMenuItem3
I've googled groups until my eyes have bled and I can't find an answer. I'd
like to use something like this:
Dim MI as MenuItem
For each MI in MyMenu.MenuItems
MI.Checked = false
Next
CType(sender, MenuItem).Checked = true
The problem is that I can't find a way to attach to the menu and get a hold
of each menu items .checked property.
Any ideas or pointers would be very helpful. I am trying to move from VB6
to .net and am having some headaches along the way.
Thanks,
Marc