Customizing the Context Menu

    Personal Customization of the Context Menu

    Hide a Button

    1. Open the JChemExcelContextMenu.xml file for edition. The default folder is the following:

      C:\Users\<Current User>\AppData\Roaming\Chemaxon\JChem for Excel

    2. Select a menu item that you want to hide from the context menu, for example, Add/Edit and set its visibility to FALSE.

      
      <?xml version="1.0" encoding="UTF-8"?>
      <button id="CM_AddEditStructureSingleCellAction" visible="false" onAction="AddEditStructureSingleCellAction" image="AddEditStructureSingleCellAction2003.png" caption="Add/Edit..." tooltipText="Adds or edits structure in the selected cell." descriptionText="Add structure to or edit structure in the selected cell.__The structure editor specifed in the Options is used._" enabled="true" />
    3. Save the modified XML file as JChemExcelContextMenu_Custom.xml. The default folder is the following:

      C:\Users\<Current User>\AppData\Roaming\Chemaxon\JChem for Excelimages/download/attachments/1807112/Customizing_the_Context_Menu_Hide.png

    Add a Button

    1. Add some new actions, for example, ImportFileAction to the context menu. Add the new actions as new rows to a selected section of the JChemExcelContextMenu.xml file.

      
      <?xml version="1.0" encoding="UTF-8"?>
      <button id="CM_ImportFileAction" visible="true" onAction="ImportFileAction" image="ImportFileAction.png" caption="Import from File" tooltipText="Import structures from file." descriptionText="Import structures from file." enabled="true" />
    2. Save the modified XML file as JChemExcelContextMenu_Custom.xml. The default folder is the following:

      C:\Users\<Current User>\AppData\Roaming\Chemaxon\JChem for Excel

    3. Paste a ImportFileAction .png file into the Images folder to provide an icon for the new button. The default folder is the following:

      C:\Users\<Current User>\AppData\Roaming\Chemaxon\JChem for Excel\Imagesimages/download/attachments/1807112/Customizing_the_Context_Menu_Add.png

    The ImportFileAction.png file already exists in the Images folder.

    The original JChemExcelContextMenu.xml file is loaded automatically instead of the customized file when starting Microsoft Excel if there is any problem with the customization.

    Corporate Level Customization of the Context Menu

    The modifications described above must be done in the original JChemExcelContextMenu.xml file and it must be re-packed in the installer.