version 11
SET MENU ITEM ICON (menu; menuItem; iconRef{; process})
| Parameter | Type | Description | |
| menu | MenuRef | Num | Menu reference or Menu number | |
| menuItem | Number | Number of menu item or | |
| -1 for the last item added to the menu | |||
| iconRef | Text | Longint | Name or number of library picture to be | |
| associated with menu item | |||
| process | Number | Process 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 either the name or number of the library picture to be used as the icon. 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.
See Also