Reputation: 8115
based on .designer.cs, i infer that the menu's arrangement is based on the order you add them on menuStrip's AddRange method:
this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.windowsMenu,
this.helpMenu});
is there a way i can change the order of menu? i put dynamically generated menu in my code, they always appear after the helpMenu, is there a way i can re-order the menu?
Upvotes: 1
Views: 1098
Reputation: 3993
When you are adding items to the menuStrip, use the Insert method, specifying the index that you want the menu inserted at.
For example, to add a menu item in the first position:
menuStrip.Items.Insert(0, new ToolStripMenuItem { Text = "Sample" });
Upvotes: 2