4D v16.3

SET MENU ITEM PARAMETER

Home

 
4D v16.3
SET MENU ITEM PARAMETER

SET MENU ITEM PARAMETER 


 

SET MENU ITEM PARAMETER ( menu ; menuItem ; param ) 
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
param  String in String to associate as parameter

The SET MENU ITEM PARAMETER command associates a custom character string with a menu item designated by the menu and menuItem parameters.

This parameter is mainly used by the Dynamic pop up menu command.

Example  

This code provides a menu including the names of the open windows and lets you get the number of the window chosen:

 WINDOW LIST($alWindow)
 $tMenuRef:=Create menu
 For($i;1;Size of array($alWindow))
    APPEND MENU ITEM($tMenuRef;Get window title($alWindow{$i})) // Title of menu item
    SET MENU ITEM PARAMETER($tMenuRef;-1;String($alWindow{$i})) // Value returned by menu item
 End for
 $tWindowRef:=Dynamic pop up menu($tMenuRef)
 RELEASE MENU($tMenuRef)



See also 

Dynamic pop up menu
Get menu item parameter
Get selected menu item parameter

 
PROPERTIES 

Product: 4D
Theme: Menus
Number: 1004

 
HISTORY 

Modified: 4D v11 SQL Release 4

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)