I create a simple form with a MenuStrip. The MenuStrip's LayoutStyle
is set to HorizontalStackWithOverflow
(the default).
According to the MSDN reference on MenuStrip, its LayoutStyle property is inherited from ToolStrip. One of the possible values for the LayoutStyle is HorizontalStackWithOverflow
which is also the default setting. This setting should provide items with its Overflow
property set to AsNeeded are moved to an overflow button.
When I run the application and resize the form so the menu won't fit completely, this doesn't happen. I've set my ToolStripMenuItems Overflow property to AsNeeded, but when I resize the form, the menu items on the right just disappear.
Is the documentation wrong and can you only get an overflowbutton on a ToolStrip and not on a MenuStrip? Or is there something else I have to do in order to get things working? Or am I just misreading the documentation?
myMenuStrip.CanOverflow = True
is really the key. @comecme: consider marking as accepted answer. – Skillern