Select to view content in your preferred language

How to add a button to an existing custom tab

03-28-2016 12:00 PM
New Contributor II

In a previous project, I created a custom tab that contains one button that opens a dockpane docked with esri_core_contentsDockPane. In a completely separate C# project, I want to create a new button and add it to the same custom tab. The goal is to have a custom tab for all of our organization's tools - we don't want them in the "Add-In" tab - and to be able to have different programmers add their tools to this custom tab.

Can someone explain the best way to do this with an example config.daml file if possible. Thanks!

0 Kudos
2 Replies
Esri Regular Contributor

Hi April,

Config.daml snippet from addIn one defines the Tab with a group:

... <tabs>

        <tab id="Custom_Tab" caption="My Tab">

          <group refID="TabModule_Group1" />




        <group id="TabModule_Group1" caption="Group 1" appearsOnAddInTab="false">

          <!-- host controls within groups -->

          <button refID="TabModule_Dockpane1_ShowButton" size="large" />



Config.daml snippet from  addin two inserts a new button within the "Custom Tab" tab defined above:


        <!-- add your controls here -->

        <button id="NewAddin_Button1" caption="New Button" className="Button1" loadOnClick="true" smallImage="Images\GenericButtonBlue16.png" largeImage="Images\GenericButtonBlue32.png">

          <tooltip heading="Tooltip Heading">Tooltip text<disabledText /></tooltip>




    <updateModule refID="TabModule_Module">


        <updateGroup refID="TabModule_Group1">

          <insertButton refID="NewAddin_Button1"/>






Note: Pro processes all the Add-in insertions (new elements) first, followed by modifications to existing elements and lastly the deletion of elements.  Within this, addins are processed alphabetically. So to ensure that your add-in with the tab element loads first, please ensure that it has the lowest id attribute assigned to it. ID attribute is found in the config.daml like this:

<AddInInfo id="{139c1cb5-59ec-4f3e-81ae-2820c15459f3}" version="1.0" desktopVersion="1.3.5536">


    <Description>TabModule description</Description>


Uma Harano

Desktop SDK Team.

New Contributor II

Thank you so much for your help Uma...your example worked perfectly!


0 Kudos