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.
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.
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.
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.
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.
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.
My question, then, is if there is a way to initialize the menu and its buttons when the toolbar initializes?