RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMainMenu.Merge Method

Combines the main menu of one form with the main menu of another in non-MDI applications.

Pascal
procedure Merge(Menu: TMainMenu);
C++
__fastcall Merge(TMainMenu Menu);

Call Merge to merge another main menu with this one. Specify the menu you want merged with this menu as the Menu parameter. 

For example, to use the main menu of the first form in an application as the main menu for the application, call Merge to merge the main menu of any additional forms in the application with the main menu of the first form.  

Depending on the value of the GroupIndex property of menu items on the main menu, the merged menu items can replace menu items on the menu bar, or insert menu items into the menu bar. See GroupIndex for information on how to do these things. 

To merge and unmerge main menus automatically when other forms are displayed, change the value of the AutoMerge property to true on all forms whose menus should be merged in. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!