Create menu

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 11


Create menu {(menu)} MenuRef

ParameterTypeDescription
menuMenuRef | Num | AlphaMenu reference or
Number or Name of menu bar
Function resultMenuRefMenu reference

Description

The Create menu command can be used to create a new menu in memory. This menu will only exist in memory and will not be added in the Menu editor in Design mode. Any changes made to this menu during the session will be immediately carried over to all the instances of this menu and in all the processes of the database.

The command returns an ID of the MenuRef type for the new menu.

If you do not pass the optional menu parameter, the menu is created blank. You must build and manage it using the APPEND MENU ITEM, SET MENU ITEM, etc. commands.

If you pass the menu parameter, the menu created will be an exact copy of the source menu designated by this parameter. All the properties of the souce menu, including any associated submenus, will be applied to the new menu. Note that a new MenuRef reference is created for the source menu and for any existing submenus that are associated with it.

In the menu parameter, you can pass either a valid menu reference, or the number or name of a menu bar defined in Design mode. In this last case, the new menu will be made up of the menus and submenus of the source menu bar.

A menu created by this command can be used as the menu bar using the SET MENU BAR command.

Example

Refer to the example of the SET MENU BAR command.


See Also

Dynamic pop up menu, RELEASE MENU, SET MENU BAR.


4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next