Moving menus in Visual C #

I have a menu with the following structure (simplified for illustration):

Menu Bar
 |--File
 |   |--Save
 |   |--Exit
 |--Tools
 |   |--Tool Category 1
 |   |--Tool Category 2
 |   |--Tool Category 3
 |--Help
     |--About

I want to restore it 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 will not allow me to drag these menu items, except to reorganize them within the specific menu group in which they are already located. Is there a way to move them without completely rebuilding the menu bar? Note that there are actually many more menu items than the ones I showed.

+3
source share
3 answers

I tried this and it worked:

  • Right-click the menu item that you want to move.
  • Choose "Cut" in the context menu
  • , .
  • ""

, .

+2

. , :

       this.mnuInfo.Items.AddRange(
          new System.Windows.Forms.ToolStripItem[] {
             this.mniAddNewProject,
             this.mniAddNewWorkFlow,      
             this.mniDeleteProject
          }
       );

, , , .

       this.mnuInfo.Items.AddRange(
          new System.Windows.Forms.ToolStripItem[] {
             this.mniAddNewProject
          }
       );
       this.newMenuItem.Items.AddRange(
          new System.Windows.Forms.ToolStripItem[] {
             this.mniAddNewWorkFlow,      
             this.mniDeleteProject
          }
       );

. , .

+4

Just redesign the menu from scratch, sometimes it's best to start! :-)

+1
source

All Articles