General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion Customize the mouse right click menu.

  • bjorn

    Customize the mouse right click menu.

    Participants 0
    Replies 1
    Last Activity 5 years, 2 months ago

    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();[/code]

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

    Thanks!

    Reply

    XMetaLOldTimer

    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.

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support