Skip to main content
Version: Next

DELETE MENU ITEM

DELETE MENU ITEM ( menu ; menuItem {; process} )

ParameterTypeDescription
menuLongint, MenuRef🡒Menu number or Menu reference
menuItemLongint🡒Menu item number or -1 for last item added
processLongint🡒Process reference number

Description

The DELETE MENU ITEM command deletes the menu item whose menu number or reference is passed in menu and whose item number is passed in menuItem. You can pass -1 in menuItem in order to indicate the last item added to menu.

If the menu item specified by menu and menuItem is itself a menu managed by reference and created, for example, using the Create menu command, DELETE MENU ITEM will only delete the instance of the menuItem in menu. The submenu referenced by the menuItem will continue to exist in memory. You must use the RELEASE MENU command in order to definitively delete a menu that is managed by reference.

This command also works with a menu bar created using the Create menu command and installed with the SET MENU BAR command.

If you omit the process parameter, DELETE MENU ITEM applies to the menu bar for the current process. Otherwise, DELETE MENU ITEM applies to the menu bar for the process whose reference number is passed in process.

Note: If you pass a MenuRef in menu, the process parameter serves no purpose and will be ignored.

Note: For consistency in the user interface, do not keep a menu with no items.

See also

APPEND MENU ITEM
INSERT MENU ITEM