SET MENU ITEM PROPERTY

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


SET MENU ITEM PROPERTY (menu; menuItem; property; value{; process})

ParameterTypeDescription
menuMenuRef | LongintMenu reference or menu number
menuItemLongintNumber of menu item or -1 for the last item
added to the menu
propertyStringProperty type
valueExpressionProperty value
processLongintProcess number

Description

The SET MENU ITEM PROPERTY command is used to set the value of the property for 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 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:

property (Constant)value (Possible values)
Associated Standard Action0 = No Action
Used to associate a standard action1 = Cancel Action
with a menu item.2 = Accept Action
3 = Next record Action
4 = Previous record Action
5 = First record Action
6 = Last record Action
7 = Delete record Action
8 = Next page Action
9 = Previous page Action
10 = First page Action
11 = Last page Action
12 = Edit subrecord Action
13 = Delete subrecord Action
14 = Add subrecord Action
17 = Undo Action
18 = Cut Action
19 = Copy Action
20 = Paste Action
21 = Clear Action
22 = Select all Action
23 = Show Clipboard Action
26 = Test Application Action
27 = Quit Action
31 = Redo Action
32 = Preferences Action
35 = Return to Design mode
36 = MSC Action
Start a New Process0 = Yes
Used to activate the "Start1 = No
New Process" option.
Access Privileges0 = All Groups
Used to assign an access group to >0 = Group ID
the command.

For more information about standard menu item properties, refer to the "Creating Custom Menus" chapter 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.

See Also

GET MENU ITEM PROPERTY.


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