4D v14.3

SET MENU ITEM METHOD

Home

 
4D v14.3
SET MENU ITEM METHOD

SET MENU ITEM METHOD 


 

SET MENU ITEM METHOD ( menu ; menuItem ; methodName {; process} )  
Parameter Type   Description
menu  Longint, MenuRef in Menu reference or Menu number
menuItem  Longint in Number of menu item or -1 for the last item added to the menu
methodName  String in Method name
process  Longint in Process number

The SET MENU ITEM METHOD command modifies the 4D project method associated with the menu item designated by the menu and menuItem parameters.

You can pass -1 in menuItem in order to specify the last item added to menu.

In menu, you can pass a menu reference (MenuRef) or a menu number. If you pass a menu reference, the command will apply to all the instances of the menu in all the processes. In this case, the process parameter is ignored if it is passed. If you pass a menu number, the command will be applied to the corresponding menu in the main menu bar of the current process. If you want to designate another process, pass its number in the optional process parameter.

In method, pass the name of the 4D method as a character string (expression).

Note: If the menu item corresponds to the title of a hierarchical sub-menu, the method will not be called when the menu item is selected.

Example  

Refer to the example of the SET MENU BAR command.

 
PROPERTIES 

Product: 4D
Theme: Menus
Number: 982

 
HISTORY 

Created: 4D v11 SQL

 
SEE ALSO 

Get menu item method

 
ARTICLE USAGE

4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)