If I create a menu with two items (say \"Item1\" and \"Item2\" and then create two subitems under each one (1A, 1B, 2A and 2B), and then disable Item1, I\'d expect that 1A and 1
I can confirm that this occurs with the MenuStrip for Framework 2.0, 3.5 and 4.0. The only reasonable workaround that I have is to set the Visible
property to false
, so the item does not appear at all. Not Ideal, but better than having the sub-items accessible.
Of course you can also create a function that will recursively disable all child items, that way even if they appear, they are at least disabled, you will need to maintain the previous state to ensure that you do not later re-enable a child item that is actually inteded to be disabled etc. The documentation indicates that this is actually what happens, but that is not the case, sub-items remain enabled even when the parent item is disabled.