Pages: 1
Print
Author Topic: Customize the mouse right click menu.  (Read 486 times)
bjorn
Member

Posts: 28



« on: April 10, 2017, 04:59:28 AM »

Hi.

I looking into remove some alternatives for the right click menu for the mouse (see attached image).
I see that there is a possibility for removing it completely, but can't find anything for just removing some of the options.
Code:
Application.DisableDocumentContextMenu();

Is there some code that just remove some of the options?


Thanks!



* 2017-04-10 12_52_51-Greenshot image editor.png (35.32 KB, 777x571 - viewed 83 times.)
Logged
XMetaLOldTimer
Global Moderator
Member

Posts: 51


« Reply #1 on: April 11, 2017, 04:51:14 PM »

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 <dtd_name>.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.
Logged

Addam Smith, XMetaL Project Lead & Architect
JustSystems Canada Inc.
Pages: 1
Print
Jump to:  

email us