<?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 Python Add-in puzzler with menus on a toolbar in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-add-in-puzzler-with-menus-on-a-toolbar/m-p/288280#M22312</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I created a Python add-in with the wizard. Then I created a toolbar with a couple of combo boxes and tools. Lastly, I added a menu to hold three buttons that will generate PDF maps that I call the print menu.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've got the combo boxes initializing as enabled = False, then changing them to true after the user selects some features with the tools. All pretty nice.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd like to make the buttons on the print menu disabled until the combo boxes have accepted their value entries. But there's a problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you try to set them to enabled with the combo box you get a message that the item doesn't exist. That's because those three items haven't been created or initialized yet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The buttons in the print menu don't initialize until someone clicks the menu name on the toolbar. At that point, the three buttons are initialized and set to be disabled. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The menu items don't exist in the Python script that is user editable, so you can't control them there. They only exist in the config.xml file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My question, then, is if there is a way to initialize the menu and its buttons when the toolbar initializes?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Jul 2013 18:30:29 GMT</pubDate>
    <dc:creator>DavidAllen</dc:creator>
    <dc:date>2013-07-03T18:30:29Z</dc:date>
    <item>
      <title>Python Add-in puzzler with menus on a toolbar</title>
      <link>https://community.esri.com/t5/python-questions/python-add-in-puzzler-with-menus-on-a-toolbar/m-p/288280#M22312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I created a Python add-in with the wizard. Then I created a toolbar with a couple of combo boxes and tools. Lastly, I added a menu to hold three buttons that will generate PDF maps that I call the print menu.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've got the combo boxes initializing as enabled = False, then changing them to true after the user selects some features with the tools. All pretty nice.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd like to make the buttons on the print menu disabled until the combo boxes have accepted their value entries. But there's a problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you try to set them to enabled with the combo box you get a message that the item doesn't exist. That's because those three items haven't been created or initialized yet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The buttons in the print menu don't initialize until someone clicks the menu name on the toolbar. At that point, the three buttons are initialized and set to be disabled. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The menu items don't exist in the Python script that is user editable, so you can't control them there. They only exist in the config.xml file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My question, then, is if there is a way to initialize the menu and its buttons when the toolbar initializes?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 18:30:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-add-in-puzzler-with-menus-on-a-toolbar/m-p/288280#M22312</guid>
      <dc:creator>DavidAllen</dc:creator>
      <dc:date>2013-07-03T18:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Python Add-in puzzler with menus on a toolbar</title>
      <link>https://community.esri.com/t5/python-questions/python-add-in-puzzler-with-menus-on-a-toolbar/m-p/288281#M22313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;At the bottom of your add-in .py file you can pre-initialize them like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family:Courier New;"&gt;button1 = ButtonClass() # Assuming you have a button named button1 with class ButtonClass&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This usually works fine.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 21:49:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-add-in-puzzler-with-menus-on-a-toolbar/m-p/288281#M22313</guid>
      <dc:creator>JasonScheirer</dc:creator>
      <dc:date>2013-07-03T21:49:40Z</dc:date>
    </item>
  </channel>
</rss>

