Important: The information in this document is obsolete and should not be used for new development.
SetMenuItemText
Use theSetMenuItemText
procedure to set the text of a specific menu item to a given string. TheSetMenuItemText
procedure is also available as theSetItem
procedure.
PROCEDURE SetMenuItemText (theMenu: MenuHandle; item: Integer; itemString: Str255);
theMenu
- A handle to the menu record of the menu containing the menu item whose text you wish you to set.
item
- The item number of the menu item. The
SetMenuItemText
procedure sets the text of this item.itemString
- The
SetMenuItemText
procedure sets the text of the menu item according to the string specified in theitemString
parameter. TheSetMenuItemText
procedure does not recognize metacharacters or set any other characteristics of the menu item. TheitemString
parameter can be blank, but it should not be an empty string.DESCRIPTION
TheSetMenuItemText
procedure sets the text of the specified menu item to the text specified in theitemString
parameter. TheSetMenuItemText
procedure does not recognize any metacharacters used by theAppendMenu
andInsertMenuItem
procedures. Use other Menu Manager routines to set other characteristics of a menu item.If you set the text of a menu item using the
SetMenuItemText
procedure, you should store the text in a string resource so that your application can be more easily localized.SEE ALSO
See Listing 3-9 on page 3-59 for an example of setting the text of a menu item.