Select to view content in your preferred language

Customize Editor Widget Toolbar

3796
7
07-20-2012 12:02 PM
DonCaviness
Occasional Contributor
I have implemented the editor widget in my application but I would like to remove some of the buttons/functions from the toolbar.  This seems simple enough but I haven't been able to figure it out yet.  I would like to remove the delete, feature creation button and remove all options but 'New Selection' from the selection drop down.  How would I go about accomplishing what I'm trying to do?  I have search the forums and the API reference but I haven't seen how to do this.

Thanks,

Don
0 Kudos
7 Replies
SiqiLi
by Esri Contributor
Esri Contributor
You can modify the toolbarOptions to include/exclude merge, cut, and reshape tools on the toolbar. But I believe all the others tools have been embedded in the toolbar by design. I don't think you can remove them.

toolbarOptions: {
    reshapeVisible: false,
    cutVisible: false,
    mergeVisible: false
  }
0 Kudos
DonCaviness
Occasional Contributor
Thanks Shuping, that is what I figured.  I am taking advantage of the toolbarOptions but some of the hard coded buttons is what I was looking to toggle on/off.  It would be nice if a new version of the API would allow the entire toolbar to be customized, not just the toolbarOptions.
0 Kudos
JeffPace
MVP Alum
Which buttons? would it be sufficient just to hide them?
0 Kudos
DonCaviness
Occasional Contributor
Hiding them is a valid solution for my purposes. I'm looking to remove the delete, feature creation button and remove all options but 'New Selection' from the selection drop down.  Is there a way to just hide them?
0 Kudos
JeffPace
MVP Alum
Its going to be harder than I thought.  ESRI does not ID the components well.

The create feature is a table with id="esri_dijit_editing_tools_Editing_0"

Delete has no id by a widgetid of "btnDelete2"

thats a shame.
0 Kudos
VaibhavGrigo3
Emerging Contributor

Hi Everyone,

I was able to remove the point from the simple toolbar options. Here is the code:

myEditor.on("load", function()

  {

  var toolBarDiv= dom.byId("esri_dijit_editing_tools_Editing_0");

  domStyle.set(toolBarDiv, "display", "none");

  });

It will hide that tool from the editor tools. But i am still struggling to eliminate the selection options(Add To Selection, Subtract from Selection).

0 Kudos
VaibhavGrigo3
Emerging Contributor

Please add this in the style tag and then you will be able to remove those two options from the dropdown.

#btnAddToSelection

{

display:none;

}

#btnSubtractFromSelection

{

display:none;

}

0 Kudos