Important: The information in this document is obsolete and should not be used for new development.
DisableItem
Use theDisableItemprocedure to disable a menu item or an entire menu.
PROCEDURE DisableItem (theMenu: MenuHandle; item: Integer);
theMenu- A handle to the menu record of the menu containing the menu item
to disable.item- The item number of the menu item to disable, or 0 to disable the entire menu. You cannot individually disable a menu item with an item number greater than 31.
- If you specify 0 in the
itemparameter, theDisableItemprocedure disables the menu title and all items in the menu, including menu items with item numbers greater than 31.DESCRIPTION
TheDisableItemprocedure disables a specified menu item so that it appears dim and cannot be chosen by the user.If your application disables a menu using
DisableItem, your application should callDrawMenuBarto update the menu bar's appearance.SEE ALSO
See "Enabling and Disabling Menu Items" on page 3-58 for examples of disabling items in a menu.