I have created a Pro custom item to support a new data type in Plugin Data Source. On right click I have created 2 menus. But I want to add a submenu for the second one.
<insertModule id="Addin_Module" className="Module1" autoLoad="true" caption="Module1">
<controls>
<button id="Addin_AddToCurrentMap" caption="Add To Current Map" className="AddToCurrentMap" loadOnClick="true" smallImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/AddLayerFromPath16.png" largeImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/AddLayerFromPath32.png" />
<button id="Addin_AddToNewMap" caption="Add To New Map" className="AddToNewMap" loadOnClick="true" smallImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/AddLayerFromPath16.png" largeImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/AddLayerFromPath32.png" />
</controls>
<menus>
<menu id="Addin_ProCustomItem_ContextMenu" caption="Context Menu">
<button refID="Addin_AddToCurrentMap" />
<button refID="Addin_AddToNewMap" />
</menu>
</menus>
</insertModule>
<categories>
<updateCategory refID="esri_customItems">
<insertComponent id="Addin_ProCustomItem" className="Addin.ProCustomItem">
<content displayName="pro custom item" fileExtension="abc" isContainer="false" keywords="ProCustomItem" contextMenuID="Addin_ProCustomItem_ContextMenu">
<filterFlags>
<type id="AddToMap" />
</filterFlags>
</content>
</insertComponent>
</updateCategory>
</categories>
But right now using the above code its just adding two options in the context menu. How can we make the second option a menu with submenus.
Solved! Go to Solution.
Hi,
The sample below is from @NarelleChedzey answer in thread.
<menus>
<menu id="esri_task_insertMenu" caption="Task" extendedCaption="Ribbon add task items menu" keytip="TA"
largeImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/TaskItem32.png"
smallImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/TaskItem16.png">
<tooltip heading="Task">Add task items to your project.</tooltip>
<button refID="esri_tasks_NewProjectTaskItem" />
<menu refID="esri_tasks_ImportTaskFileMenu"/>
</menu>
<menu id="esri_tasks_ImportTaskFileMenu" caption="Import and Open Task File"
largeImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericImport32.png"
smallImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericImport16.png">
<button refID="esri_tasks_ImportTaskFileBrowse"/>
<dynamicMenu refID="esri_tasks_ImportMenu" inline="true"/>
</menu>
</menus>
You can add one menu item to another menu item.
Hi,
The sample below is from @NarelleChedzey answer in thread.
<menus>
<menu id="esri_task_insertMenu" caption="Task" extendedCaption="Ribbon add task items menu" keytip="TA"
largeImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/TaskItem32.png"
smallImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/TaskItem16.png">
<tooltip heading="Task">Add task items to your project.</tooltip>
<button refID="esri_tasks_NewProjectTaskItem" />
<menu refID="esri_tasks_ImportTaskFileMenu"/>
</menu>
<menu id="esri_tasks_ImportTaskFileMenu" caption="Import and Open Task File"
largeImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericImport32.png"
smallImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericImport16.png">
<button refID="esri_tasks_ImportTaskFileBrowse"/>
<dynamicMenu refID="esri_tasks_ImportMenu" inline="true"/>
</menu>
</menus>
You can add one menu item to another menu item.