4D v14.3

SET MENU ITEM PROPERTY

Home

 
4D v14.3
SET MENU ITEM PROPERTY

SET MENU ITEM PROPERTY 


 

SET MENU ITEM PROPERTY ( menu ; menuItem ; property ; value {; 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
property  String in Property type
value  Expression in Property value
process  Longint in Process number

The SET MENU ITEM PROPERTY command sets the value of the property for the menu item designated by the menu and menuItem parameters.

You can pass -1 in menuItem 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 take the corresponding menu in the main menu bar of the current process into account. If you want to designate another process, pass its number in the optional process parameter.

In the property parameter, pass the property whose value you want to modify and pass the new value in value. For the property parameter, you can use one of the constants of the “Menu Item Properties” theme or any custom value:

Standard property: The constants of the “Menu Item Properties” theme as well as their possible values are described below. Note that in the case of the Associated Standard Action property, you can pass one of the constants of the “Value for Associated Standard Action” theme in the value parameter:

Constant Type Value Comment
Access privileges String 4D_access_group Assign an access group to the command
0 = All Groups
>0 = Group ID
Associated standard action String 4D_standard_action Associate a standard action with a menu item
See the constants of the Value for Associated Standard Action theme
Start a new process String 4D_start_new_process Activate the "Start New Process" option
0 = No, 1 = Yes

Here are the constants for the “Value for Associated Standard Action” theme:

Constant Type Value
Accept action Longint 2
Add subrecord action Longint 14
Cancel action Longint 1
Clear action Longint 21
Copy action Longint 19
Cut action Longint 18
Database settings action Longint 32
Delete record action Longint 7
Delete subrecord action Longint 13
Edit subrecord action Longint 12
First page action Longint 10
First record action Longint 5
Last page action Longint 11
Last record action Longint 6
MSC action Longint 36
Next page action Longint 8
Next record action Longint 3
No action Longint 0
Paste action Longint 20
Previous page action Longint 9
Previous record action Longint 4
Quit action Longint 27
Redo action Longint 31
Return to Design mode Longint 35
Select all action Longint 22
Show clipboard action Longint 23
Test application action Longint 26
Undo action Longint 17

For more information about standard menu item properties, refer to the “Building menus” section of the Design Reference manual.

Custom property: In property, you can pass any custom text and associate a value of the text, number or Boolean type with it. This value will be stored with the item and can be retrieved using the GET MENU ITEM PROPERTY command. You can use any custom string in the property parameter, simply make sure not to use a title used by 4D (by convention, properties set by 4D begin with “4D_”).

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

 
PROPERTIES 

Product: 4D
Theme: Menus
Number: 973

 
HISTORY 

Created: 4D v11 SQL

 
SEE ALSO 

GET MENU ITEM PROPERTY

 
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)