Autoload combobox

954
4
Jump to solution
06-04-2019 09:55 AM
MaxMax2
Occasional Contributor II

Is it possible to load combobox defined in Config.daml automatically on ArcGIS Pro start? Something like loadOnClick="false" for button. I want to load combobox without necessity to go to add-in tab. I need it to have combobox view model created when add-in initialized.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
UmaHarano
Esri Regular Contributor

The ComboBox class is created only when it gets visible. This is by design.  The Combobox contents can be initialized in the Module Class. You can then access this in your ComboBox class by referencing it from the Module. module1.Current.ComboBoxItems...

View solution in original post

0 Kudos
4 Replies
UmaHarano
Esri Regular Contributor

You can set the "autoload" attribute for the "insertModule" element in the Config.daml to true in your add-in. This will load your add-in as soon as Pro opens up. 

...
<modules>
 <insertModule id="Pro_AddIn_Module" className="Module1" autoLoad="true" caption="Module1">
...
0 Kudos
MaxMax2
Occasional Contributor II

No, that doesn't work. ComboBox view model is not created until add-in tab opened in ribbon. Seems like a bug.

0 Kudos
UmaHarano
Esri Regular Contributor

The ComboBox class is created only when it gets visible. This is by design.  The Combobox contents can be initialized in the Module Class. You can then access this in your ComboBox class by referencing it from the Module. module1.Current.ComboBoxItems...

0 Kudos
JamalWest2
Occasional Contributor

How do you actually reference the combobox in module1? Can you provide an example. I am trying to do the same only with a prowindow.

0 Kudos