Select to view content in your preferred language

Disable Editing on TextSymbol

3124
3
07-01-2015 02:10 PM
CraigPennington
Occasional Contributor

I'm adding a TextSymbol to a map and by default, a user can click it and edit it.  I want to disable the ability to edit.  Can this be done?

Tags (1)
0 Kudos
3 Replies
DuncanHornby
MVP Notable Contributor

When you say add a TextSymbol to the Map and then the user can click on it, this to me is suggesting you have added a TextElement, is that what you meant?

Being Devils advocate here, how do you intend to distinguish between text elements you have added to the Map via your code and those added by the user?

0 Kudos
CraigPennington
Occasional Contributor

I should have been more clear about the environment.  This is ArcGIS for JavaScript.  The user really has no direct means of creating TextSymbols or graphic elements other than through limited mechanisms we make available.  The TextSymbols are created by our code.  It would be nice if one of the constructor options was to indicate whether the item should be editable, but I don't see that in the documentation.

0 Kudos
DarrenWiens2
MVP Honored Contributor

Are we talking ArcMap, or some other platform?

If ArcMap, and if on the data view, consider using Annotation instead. They take a lot more effort to edit.

Otherwise, I can imagine listening for the text element text to change, then immediately changing it back to the original, but not without some code (ArcObjects).

0 Kudos