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 SubToolStripMen uItem1_Click(By Val sender As System.Object, ByVal
e As System.EventArg s) Handles SubToolStripMen uItem1.Click
SubToolStripMen uItem.Checked = False
SubToolStripMen uItem1.Checked = False
SubToolStripMen uItem2.Checked = False
SubToolStripMen uItem3.Checked = True
End Sub
My DropDownButton is called: ToolStripDropDo wnButton1
My Menu that contains the 4 sub items is called: MyToolStripMenu Item
My sub items are: SubToolStripMen uItem, SubToolStripMen uItem1,
SubToolStripMen uItem2, SubToolStripMen uItem3
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.MenuItem s
MI.Checked = false
Next
CType(sender, MenuItem).Check ed = 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