SetMenuItemText command

The SetMenuItemText command changes the text string of the specified menu item.

 

Syntax

Integer=MenuItemID

String$='ItemText'

PluginSet("PlugIn","Integer")

PluginSet("PlugIn","String$")

PluginRun("PlugIn","SetMenuItemText")

Parameters

MenuItemID

[in] Associated with the menu item unique identifier or submenu handle if menu item opens submenu. See CreateMenuItem command.

ItemText

[in] Specifies new text string of the menu item.

Beside menu item text this parameter can specify access key for the menu item. An access key is an underlined letter in the text of a menu item. When a menu is active, the user can select a menu item by pressing the key that corresponds to the item's underlined letter.

To create an access key for a menu item, precede any character in the item's text string with an ampersand. For example, the text string "&Close" causes the system to underline the letter "C".

In addition to having an access key, a menu item can have a shortcut key associated with it. A shortcut key is different from an access key, because the menu does not have to be active for the shortcut key to work. You can specify shortcut key as part of ItemText parameter.

Text that identifies the shortcut key is added to the menu item text string. The shortcut text appears to the right of the menu item name, after tab character (CHR(9)).