<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Reorder Python Addin Elements without Rebuilding Entire Addin? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/reorder-python-addin-elements-without-rebuilding/m-p/378945#M29895</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I spoke with John on this through e-mail, but thought I would post the answer here as well in case anyone in the future needs to know.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To change this you would need to modify the config.xml. Below is an example of the section of the config defining the toolbars. Inside the Toolbars tag are two toolbars. Defined with Toolbar2 are the items on that Toolbar. In this scenario I have a 2 buttons, followed by a tool and a combobox in that order.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;Toolbars&amp;gt;&amp;nbsp; &amp;lt;Toolbar caption="Toolbar2" category="Python Addin" id="TestAddin_addin.toolbar" showInitially="true"&amp;gt; &amp;nbsp; &amp;lt;Items&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;Button refID="TestAddin_addin.button" /&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;Button refID="TestAddin_addin.button_1" /&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;Tool refID="TestAddin_addin.tool" /&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;ComboBox refID="TestAddin_addin.combobox" /&amp;gt; &amp;nbsp; &amp;lt;/Items&amp;gt;&amp;nbsp; &amp;lt;/Toolbar&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Toolbar caption="Toolbar1" category="Python Addin" id="TestAddin_addin.toolbar_1" showInitially="true"&amp;gt;&amp;lt;Items /&amp;gt;&amp;lt;/Toolbar&amp;gt; &amp;lt;/Toolbars&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I want to move the combox box to be the first item on the toolbar I would modify the xml to the following, with the ComboxBox defined first.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;Toolbars&amp;gt;&amp;nbsp; &amp;lt;Toolbar caption="Toolbar2" category="Python Addin" id="TestAddin_addin.toolbar" showInitially="true"&amp;gt; &amp;nbsp; &amp;lt;Items&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;ComboBox refID="TestAddin_addin.combobox" /&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;Button refID="TestAddin_addin.button" /&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;Button refID="TestAddin_addin.button_1" /&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;Tool refID="TestAddin_addin.tool" /&amp;gt; &amp;nbsp; &amp;lt;/Items&amp;gt;&amp;nbsp; &amp;lt;/Toolbar&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Toolbar caption="Toolbar1" category="Python Addin" id="TestAddin_addin.toolbar_1" showInitially="true"&amp;gt;&amp;lt;Items /&amp;gt;&amp;lt;/Toolbar&amp;gt; &amp;lt;/Toolbars&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wouldn???t be too concerned with modifying the xml, just make a copy of the original first and keep it as a back-up in case anything goes wrong you can always roll back. At this time this is the only way to modify the order of elements on a toolbar after it has already been authored in the python add-in wizard.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Jan 2013 21:41:18 GMT</pubDate>
    <dc:creator>ChrisFox3</dc:creator>
    <dc:date>2013-01-31T21:41:18Z</dc:date>
    <item>
      <title>Reorder Python Addin Elements without Rebuilding Entire Addin?</title>
      <link>https://community.esri.com/t5/python-questions/reorder-python-addin-elements-without-rebuilding/m-p/378944#M29894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does anyone know of a way to reorder Python Addin elements built in the Addin Assistant without having to rebuild the entire thing? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration:underline;"&gt;Situation:&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I built a couple of toolbars and toolpalettes, buttons, tools, ect. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've been asked to insert a "Combo Box" drop down to control the tool all of the elements enabled state based on the user's combo box selection &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ie.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT][/INDENT]&lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;if combo box = "Selection1", tool1, tool2 and tool3, self.enabled=true and tool4, tool5, tool6 self.enabled=false&lt;/SPAN&gt;&lt;SPAN&gt;. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's not the actual code, just a basic reference to give you an idea of what I mean.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So when I added the combo box into the addin, the stupid thing is at the end of the toolpalette and toolbar because of course, I created it after everything else. There doesn't appear to be a way to just drag and drop elements into the order you want them to appear in. I thought about maybe editing the config.xml but first of all, I don't know if that will actually solve the problem and secondly, I'd prefer not to delve into that and open pandora's box if there is a more elegant solution available.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know I can hit customize in ArcMap and move it. But that customization won't reflect in the esriaddin file I distribute, so when others install it they will need to make that customization as well which...they shouldn't have to do.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 12:58:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reorder-python-addin-elements-without-rebuilding/m-p/378944#M29894</guid>
      <dc:creator>JohnDye</dc:creator>
      <dc:date>2013-01-28T12:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder Python Addin Elements without Rebuilding Entire Addin?</title>
      <link>https://community.esri.com/t5/python-questions/reorder-python-addin-elements-without-rebuilding/m-p/378945#M29895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I spoke with John on this through e-mail, but thought I would post the answer here as well in case anyone in the future needs to know.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To change this you would need to modify the config.xml. Below is an example of the section of the config defining the toolbars. Inside the Toolbars tag are two toolbars. Defined with Toolbar2 are the items on that Toolbar. In this scenario I have a 2 buttons, followed by a tool and a combobox in that order.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;Toolbars&amp;gt;&amp;nbsp; &amp;lt;Toolbar caption="Toolbar2" category="Python Addin" id="TestAddin_addin.toolbar" showInitially="true"&amp;gt; &amp;nbsp; &amp;lt;Items&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;Button refID="TestAddin_addin.button" /&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;Button refID="TestAddin_addin.button_1" /&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;Tool refID="TestAddin_addin.tool" /&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;ComboBox refID="TestAddin_addin.combobox" /&amp;gt; &amp;nbsp; &amp;lt;/Items&amp;gt;&amp;nbsp; &amp;lt;/Toolbar&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Toolbar caption="Toolbar1" category="Python Addin" id="TestAddin_addin.toolbar_1" showInitially="true"&amp;gt;&amp;lt;Items /&amp;gt;&amp;lt;/Toolbar&amp;gt; &amp;lt;/Toolbars&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I want to move the combox box to be the first item on the toolbar I would modify the xml to the following, with the ComboxBox defined first.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;Toolbars&amp;gt;&amp;nbsp; &amp;lt;Toolbar caption="Toolbar2" category="Python Addin" id="TestAddin_addin.toolbar" showInitially="true"&amp;gt; &amp;nbsp; &amp;lt;Items&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;ComboBox refID="TestAddin_addin.combobox" /&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;Button refID="TestAddin_addin.button" /&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;Button refID="TestAddin_addin.button_1" /&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;Tool refID="TestAddin_addin.tool" /&amp;gt; &amp;nbsp; &amp;lt;/Items&amp;gt;&amp;nbsp; &amp;lt;/Toolbar&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Toolbar caption="Toolbar1" category="Python Addin" id="TestAddin_addin.toolbar_1" showInitially="true"&amp;gt;&amp;lt;Items /&amp;gt;&amp;lt;/Toolbar&amp;gt; &amp;lt;/Toolbars&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wouldn???t be too concerned with modifying the xml, just make a copy of the original first and keep it as a back-up in case anything goes wrong you can always roll back. At this time this is the only way to modify the order of elements on a toolbar after it has already been authored in the python add-in wizard.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2013 21:41:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reorder-python-addin-elements-without-rebuilding/m-p/378945#M29895</guid>
      <dc:creator>ChrisFox3</dc:creator>
      <dc:date>2013-01-31T21:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder Python Addin Elements without Rebuilding Entire Addin?</title>
      <link>https://community.esri.com/t5/python-questions/reorder-python-addin-elements-without-rebuilding/m-p/378946#M29896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Chris,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Would you mind taking a look at this post if you have a few moments?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/78771-Use-Selection-of-one-Combobox-to-update-the-items-list-in-another-Combobox?referrerid=32780"&gt;http://forums.arcgis.com/threads/78771-Use-Selection-of-one-Combobox-to-update-the-items-list-in-another-Combobox?referrerid=32780&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 14:48:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reorder-python-addin-elements-without-rebuilding/m-p/378946#M29896</guid>
      <dc:creator>JohnDye</dc:creator>
      <dc:date>2013-02-28T14:48:49Z</dc:date>
    </item>
  </channel>
</rss>

