I recently upgraded from ArcGIS Pro 3.2 to ArcGIS Pro 3.4. I had my add-in toolbar rearranged in a certain way where I was stacking items in a compact form (see picture below). In my DAML, I have custom toolbar (module) where I have 3 groups of UI elements. My first group, I have a large button followed by three toolbars. Each toolbars had different UI elements such as labels, text boxes, and small buttons. When I upgraded to 3.4, all my UI elements were spaced out like below:
What has changed in 3.4 that caused this? How can I get it back to the way it was before? There is also a lot more spacing between UI elements.
My DAML looks like this:
<modules>
<insertModule id="MyAddin_Module" className="MyModule" autoLoad="true" caption="MyModule">
<tabs>
<tab id="My_Scene" caption="My toolbar">
<group refID="MyName_SceneGroup" />
<group refID="MyName_Group2" />
<group refID="MyName_Group3" />
</tab>
</tabs>
<groups>
<group id="MyName_SceneGroup" caption="Group" appearsOnAddInTab="false">
<button refID="ABC_LargeButton" size="large" />
<toolbar refID="RibbonControls_Toolbar1" />
<toolbar refID="RibbonControls_Toolbar2"/>
<toolbar refID="RibbonControls_Toolbar3"/>
</group>
<group id=...>
<group id=...>
</groups>
...
<toolbars>
<toolbar id="RibbonControls_Toolbar1">
<group>
<labelControl refID="MyTool_label" size="small"/>
<editBox refID="MyTool_editBox" size="small" />
<labelControl refID="MyTool_labelUnits" size="small" />
</group>
</toolbar>
...
</toolbars>
...
...
Solved! Go to Solution.
Hi Joe.
The toolbar behavior has indeed changed slightly with our new Ribbon control in version 3.4: toolbars can no longer be stacked with other controls, including other toolbars. This change was necessary for the new simplified mode. Could you modify your DAML to include just one toolbar with multiple groups, where each group will be placed on a new row? Sorry the inconvenience. I'll help get Toolbars documented in the SDK.
<toolbar id="esri_mapping_navigateToolbar">
<group>
<button refID="esri_mapping_zoomFullButton" />
<button refID="esri_mapping_zoomToSelectionButton" />
</group>
<group>
<button refID="esri_mapping_fixedZoomInButton" />
<button refID="esri_mapping_fixedZoomOutButton" />
</group>
<group>
<button refID="esri_mapping_prevExtentButton" />
<button refID="esri_mapping_nextExtentButton" />
</group>
</toolbar>
So far what I have learned in the newer version is that there is a new hastwolines attribute in the label controls. The default must be true and if I set them to false (even for one-word labels) the extra unnecessary spacing between all the other buttons go away. Now I have to figure out if possible to stack toolbars on top of each other like was possible in version 3.2.
There is a perfect example in one of the community samples called RibbonControls (GitHub - Esri/arcgis-pro-sdk-community-samples: ArcGIS Pro SDK for Microsoft .NET Framework Communit...)
Here is what the toolbar is supposed to look like according to the github page:
But after compiling and running in ArcGIS Pro 3.4, it looks more like this:
I would like to get back to the original example, but perhaps this is a bug introduced in newer version? Ideas?
Hi Joe.
The toolbar behavior has indeed changed slightly with our new Ribbon control in version 3.4: toolbars can no longer be stacked with other controls, including other toolbars. This change was necessary for the new simplified mode. Could you modify your DAML to include just one toolbar with multiple groups, where each group will be placed on a new row? Sorry the inconvenience. I'll help get Toolbars documented in the SDK.
<toolbar id="esri_mapping_navigateToolbar">
<group>
<button refID="esri_mapping_zoomFullButton" />
<button refID="esri_mapping_zoomToSelectionButton" />
</group>
<group>
<button refID="esri_mapping_fixedZoomInButton" />
<button refID="esri_mapping_fixedZoomOutButton" />
</group>
<group>
<button refID="esri_mapping_prevExtentButton" />
<button refID="esri_mapping_nextExtentButton" />
</group>
</toolbar>
That worked! Thanks for following up!