Important: The information in this document is obsolete and should not be used for new development.
DisableItem
Use theDisableItem
procedure 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
item
parameter, theDisableItem
procedure disables the menu title and all items in the menu, including menu items with item numbers greater than 31.DESCRIPTION
TheDisableItem
procedure 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 callDrawMenuBar
to 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.