Remove menu

Command groupFlag affectedReversibleExecute on clientPlatform(s)
MenusYESYESNOAll

Syntax

Remove menu
 
menu-instance-name

Description

This command removes the specified menu instance from the menu bar and sets the flag. You can choose the menu name from a list containing any custom and standard built-in menus, such as *File, *Edit, and so on.

If you use this command to remove a menu instance which has previously been installed in place of the standard File or Edit menu (using the Replace standard File menu or Replace standard Edit menu command) the previously replaced standard File or Edit menu is restored.

If you use Remove menu in a reversible block, the specified menu instance is reinstalled when the method containing the reversible block terminates.

Example

# If the menu mView is installed remove it

Test for menu installed
 
mView

If flag true
  
Remove menu
 
mView

End If
 
# Alternatively, you can remove a menu using $close

Do
 
$imenus
.
mView
.
$close
()