SET MENU ITEM ICON

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 ICON (menu; menuItem; iconRef{; process})

ParameterTypeDescription
menuMenuRef | NumMenu reference or Menu number
menuItemNumberNumber of menu item or
-1 for the last item added to the menu
iconRefText | LongintName or number of picture to be
associated with menu item
processNumberProcess number

Description

The SET MENU ITEM ICON command can be used to modify the icon 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 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.

The icon associated with a menu item is added to the tool bar of the application. The picture will be displayed in a 20 x 20 pixel frame.

In iconRef, you can pass the picture to be used as the icon. You can use a library picture or a picture reference.

Library picture: You can pass either the name or number of the picture. It is generally preferable to use its number rather than its name since picture numbers are unique IDs, which is not the case with names.

Picture reference: The picture must be located in the Resources folder of the database and you must use a "file:{pathname}fileName" type syntax in iconRef. For more information about the Resources folder, please refer to the Resources section.

Example

Use of a picture located in the Resources folder of the database:

   SET MENU ITEM ICON($MenuRef;2;"File:English.lproj/spot.png")

See Also

GET MENU ITEM ICON.


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