Select to view content in your preferred language

Separators and ButtonPalettes

179
2
Jump to solution
06-27-2024 01:41 PM
SteveCole
Frequent Contributor

Trying to figure out what I'm missing because the SDK documentation isn't quite explaining it. I'm trying to consolidate commands in my add-in to reduce the window pane dancing so I have an "edit" group where I've incorporated many of the standard edit tools. In the DAML it's set up like such:

		  <group id="Editing_Tools" caption="Editing Tools" appearsOnAddInTab="true" keytip="ET">
			  <button refID="esri_mapping_selectToolPalette" size="large"/>
			  <button refID="esri_mapping_clearSelectionButton" size="large"/>
			  <button refID="esri_editing_ShowAttributes" size="large"/>
			  <buttonPalette refID="Editing_Tool_Commands" size="large"/>
			  <button refID="esri_editing_SaveEditsBtn" size="large"/>
			  <button refID="esri_editing_DiscardEditsBtn" size="large"/>
			  <button refID="esri_geoprocessing_toolsButton" size="large"/>
		  </group>

 

In the middle, you can see I'm using a buttonPalette to group together can save some screen real estate. The buttonPalette has been set up like this:

		<palettes>
			<buttonPalette id="Editing_Tool_Commands" caption="Edit Operations" dropDown="true" menuStyle="true" showItemCaption="false" keytip="BP">
				<button refID="esri_editing_EditVerticesMove"/>
				<button refID="esri_editing_EditVerticesRotate"/>
				<button refID="esri_editing_EditVerticesScale"/>
				<button refID="esri_editing_EditVerticesModifyFeature" separator="true"/>
				<button refID="esri_editing_ReplaceGeometry"/>
				<button refID="esri_editing_ExtendTrimFeatures"/>
				<button refID="esri_editing_LineIntersection"/>
				<button refID="esri_editing_SplitCommand" separator="true"/>
				<button refID="esri_editing_ClipCommand"/>
				<button refID="esri_editing_ExplodeFeatures"/>
				<button refID="esri_editing_MergeFeatures" separator="true"/>
				<button refID="esri_editing_BufferFeatures"/>
				<button refID="esri_editing_CopyParallel"/>
			</buttonPalette>
		</palettes>

 

I've specified the separator="true" option on a few entries so that the dropdown  would show a divider between groups of edit tools. Unfortunately, when I get into Pro, the menu looks like this:

buttonPaletteSeparator.jpg

None of the separators show up, so I'm wondering what I have set up incorrectly. The SDK discusses the concept of split buttons but it's unclear if those work with buttonPalettes. I get the impression from VS that it is not part of buttonPalettes. It *seems* like it is supported if you look at some of the default tools like the Explore Tool so I'm just confused how it actually gets implemented.

exploreToolSeparator.jpg

 

Thanks!

Steve

0 Kudos
1 Solution

Accepted Solutions
UmaHarano
Esri Regular Contributor

@SteveCole 

Try using Menus. I was able to see the separators.

      <menus>
        <menu id="damlSeparators_ButtonPalette1" caption="Palette Button 1" >
	  <button refID="esri_editing_EditVerticesMove"/>
	  <button refID="esri_editing_EditVerticesRotate"/>
	  <button refID="esri_editing_EditVerticesScale"/>
	  <button refID="esri_editing_EditVerticesModifyFeature" separator="true"/>
	  <button refID="esri_editing_ReplaceGeometry"/>
	  <button refID="esri_editing_ExtendTrimFeatures"/>
	  <button refID="esri_editing_LineIntersection"/>
	  <button refID="esri_editing_SplitCommand" separator="true"/>
	  <button refID="esri_editing_ClipCommand"/>
	  <button refID="esri_editing_ExplodeFeatures"/>
	  <button refID="esri_editing_MergeFeatures" separator="true"/>
	  <button refID="esri_editing_BufferFeatures"/>
	  <button refID="esri_editing_CopyParallel"/>
        </menu>
      </menus>

View solution in original post

2 Replies
UmaHarano
Esri Regular Contributor

@SteveCole 

Try using Menus. I was able to see the separators.

      <menus>
        <menu id="damlSeparators_ButtonPalette1" caption="Palette Button 1" >
	  <button refID="esri_editing_EditVerticesMove"/>
	  <button refID="esri_editing_EditVerticesRotate"/>
	  <button refID="esri_editing_EditVerticesScale"/>
	  <button refID="esri_editing_EditVerticesModifyFeature" separator="true"/>
	  <button refID="esri_editing_ReplaceGeometry"/>
	  <button refID="esri_editing_ExtendTrimFeatures"/>
	  <button refID="esri_editing_LineIntersection"/>
	  <button refID="esri_editing_SplitCommand" separator="true"/>
	  <button refID="esri_editing_ClipCommand"/>
	  <button refID="esri_editing_ExplodeFeatures"/>
	  <button refID="esri_editing_MergeFeatures" separator="true"/>
	  <button refID="esri_editing_BufferFeatures"/>
	  <button refID="esri_editing_CopyParallel"/>
        </menu>
      </menus>
SteveCole
Frequent Contributor

That works, thank you!

0 Kudos