About Creating Context Menus
This help page explains how user-defined context menus can be created and incorporated into the Maple context menu system for use on mathematical objects and expressions.
What Is a Context Menu
Overriding the Default Context Menu System with a User-Defined System
Appending User-defined Actions to the Default Context Menu System
Restoring the Default Context Menu System
Maple dynamically generates a menu in the Context Panel when you select an object or expression. The actions available in the Context Panel depend on the properties of the object or expression.
To customize the default context menus, you can create a new, user-defined context menu system or append user-defined entries to the built-in context menu system.
Note: Prior to Maple 2018, the entries created using ContextMenu appeared in the right-click (Control-click, on Mac) menu.
To create a user-defined context menu system:
1. Generate a new context menu module using the ContextMenu[New] command.
2. Define the actions to include in your context menu system, and add them to the context menu module. (See Creating Custom Context Menu Entries.)
3. Install the context menu system using the ContextMenu[Install] command.
If a user-defined context menu system is installed in the current session, it replaces the default system. As a result, only the actions included in the user-defined system are available. When you exit the Maple session, the user-defined system is removed from memory. To use it in future sessions, you must save it using the ContextMenu[Save] command.
For more information, see Creating a Context Menu System.
To allow access to both your user-defined actions and the default context menu system:
1. Make a copy of the built-in context menu module using the ContextMenu[CurrentContext][Copy] command.
2. Define the actions to add to the context menu system, and add them to the context menu module. (See Creating Custom Context Menu Entries.)
For more information, see Appending Actions to the Context Menu System.
After installing a new context menu module, the default context menu system can be restored by using the ContextMenu[Install]() command.
See Also
Appending Actions to the Context Menu System
ContextMenu
ContextMenu Example Worksheet
ContextMenu[CurrentContext]
ContextMenu[CurrentContext][Copy]
ContextMenu[Install]
ContextMenu[New]
ContextMenu[Test]
Creating a Context Menu System
Creating Custom Context Menu Entries
Overview of Creating Context Menus
Download Help Document