Home Forums General XMetaL Discussion Customize the mouse right click menu. Reply To: Customize the mouse right click menu.


Reply to: Customize the mouse right click menu.

Assume you are not using DITA, you can customization the context menu for all document types by implementing a On_Application_Document_Context_Menu startup event macro. 

To only customizing the context menu for a specific document type, implement a On_Context_Menu event macro in your .mcr file. 

The logic is the same for either of these event macros.  During execution of either these event macros, the  Application.ActiveContextMenu property will return a CommandBarPopup object that represents the context menu about to be displayed.  Query that objects Controls property to get the context menu's CommandBarControls collection.  From that collection, use Item method to get an individual CommandBarPopup/Control item that you want to remove and call its Delete method to actual remove it.