Important: The information in this document is obsolete and should not be used for new development.
SetMenuItemText
Use theSetMenuItemTextprocedure to set the text of a specific menu item to a given string. TheSetMenuItemTextprocedure is also available as theSetItemprocedure.
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
SetMenuItemTextprocedure sets the text of this item.itemString- The
SetMenuItemTextprocedure sets the text of the menu item according to the string specified in theitemStringparameter. TheSetMenuItemTextprocedure does not recognize metacharacters or set any other characteristics of the menu item. TheitemStringparameter can be blank, but it should not be an empty string.DESCRIPTION
TheSetMenuItemTextprocedure sets the text of the specified menu item to the text specified in theitemStringparameter. TheSetMenuItemTextprocedure does not recognize any metacharacters used by theAppendMenuandInsertMenuItemprocedures. Use other Menu Manager routines to set other characteristics of a menu item.If you set the text of a menu item using the
SetMenuItemTextprocedure, 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.