Click here to Skip to main content
15,850,685 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more:
I have a MainForm in my application, I draw a 'MenuStrip' into this MainForm, and set this, of course, I add several ToolStripMenuItems onto this MenuStrip, say 10 items.

The scenario is that, when I click and draw the MainForm be smaller and samller, the MenuStrip will then be covered in the end part, and some items in the end of the MenuStrip will be disappeared one by one.

My Question is below :

How can I have a mechanism (or setting) to have such as an extra box on the end of the MenuStrip, so that, when I click this extra box, the ToolStripMenuItems, which is disappeared when this MainForm is smaller and smaller, can be shown on a list (or a dropdown list), I then can click and select it to open one of the disappeared ToolStripMenuItem ?

I found that when I draw a ToolStrip, and add some toolstripbuttons on this ToolStrip, if I click and draw this MainForm smaller and smaller, though the ToolStrip also will be covered, there automatically (by system) have an extra box (mark) in the end of ToolStrip, for user to click and can open the disappeared toolstripbutton, can I have the same performance on the MenuStrip ?
Sports Kuo 19-May-11 22:45pm    
Hi Sports Kuo,

I finally find out the solution, it's easy.

1. set MenuStrip.CanOverflow=true.
2. set all items in MenuStrip be Item.Overflow=AsNeeded.

Please be well noticed, the above item 1 should be set by code, since there is no option of this flag in its attribut page, and the above item 2 can be set in its attribute page.

Gool luck,
Sports Kuo
(no one answer me, so I answer myself, thanks)
Sports Kuo 19-May-11 22:46pm    
Hi Sports Kuo,

Thanks of your kindly response.
ArtificerGM 8-Jun-11 17:49pm    
My Five for you answering your own question... well played!
Sports Kuo 9-Jun-11 2:03am    
Really thanks of your encourage !
Yesterday, I also find out another solution, you can set the MenuStrip attribute 'LayoutStyle=Flow' to have different type solution.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900