Reputation: 13855
I have a menu with the following structure (simplified for illustration purposes):
Menu Bar
|--File
| |--Save
| |--Exit
|--Tools
| |--Tool Category 1
| |--Tool Category 2
| |--Tool Category 3
|--Help
|--About
I want to reconstruct this as follows:
Menu Bar
|--File
| |--Save
| |--Exit
|--Tool Category 1
|--Tool Category 2
|--Tool Category 3
|--Help
|--About
However, in Visual Studio 2008 Pro it won't let me drag these menu items other than reorganize them within the particular menu group they are already in. Is there a way for me to move them without completely rebuilding the menu bar? Note that there are actually many more menu items than those that I've shown.
Upvotes: 5
Views: 2638
Reputation: 51
You can also go to the Designer Code for the Menu Items. You will find code similar to:
this.mnuInfo.Items.AddRange(
new System.Windows.Forms.ToolStripItem[] {
this.mniAddNewProject,
this.mniAddNewWorkFlow,
this.mniDeleteProject
}
);
Add the menu item into which you want to move your existing menu items and then modify then move the items.
this.mnuInfo.Items.AddRange(
new System.Windows.Forms.ToolStripItem[] {
this.mniAddNewProject
}
);
this.newMenuItem.Items.AddRange(
new System.Windows.Forms.ToolStripItem[] {
this.mniAddNewWorkFlow,
this.mniDeleteProject
}
);
And that's it. I hope this helps.
Upvotes: 5
Reputation: 8153
I tried this and it worked:
Hope it helps.
Upvotes: 2
Reputation: 37211
Just redo the menu from scratch, sometimes it's best to just start over! :-)
Upvotes: 1