Vcl.Menus.TMainMenu.Merge

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Merge(Menu: TMainMenu);

C++

void __fastcall Merge(TMainMenu* Menu);

Properties

Type Visibility Source Unit Parent
procedure
function
public
Vcl.Menus.pas
Vcl.Menus.hpp
Vcl.Menus TMainMenu

Description

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

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.

See Also