Blitz3D+ Command Reference

DisableMenu menu

Parameters

menu - menu item to disable

Description

Disables a menu item so it cannot be picked.

Requires Extended language mode.

The item greys out and stops producing menu-action events ($1001) - how a menu tells the user "not right now": Save disabled until something changes, Paste disabled while the clipboard is empty. Disabling an item that has a submenu greys out the whole branch.

For items on a window's menu bar, call UpdateWindowMenu afterwards so the native bar redraws with the new state; popup menu items simply show the change the next time the popup opens. Query the current state with MenuEnabled, and re-enable with EnableMenu.

The world editor shell sample shows the menu-driven editor pattern this belongs to.

See also: EnableMenu, MenuEnabled, CheckMenu, UpdateWindowMenu, CreateMenu.

Index