Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Macintosh Toolbox Essentials /
Chapter 3 - Menu Manager / Menu Manager Reference
Menu Manager Routines / Getting and Setting the Appearance of Menu Items


DisableItem

Use the DisableItem 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, the DisableItem procedure disables the menu title and all items in the menu, including menu items with item numbers greater than 31.
DESCRIPTION
The DisableItem 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 call DrawMenuBar 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.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996