5

I am trying to do a simple format of a text box in ArcMap. I went into the 'About Formating Text' and copied a tag to change color and when I apply the setting, the text doesn't change color and the tags appear in the text like this:

enter image description here

Can anyone suggest what I am doing wrong?

  • I bet you need to use all three color values (red, green, and blue). – Roy Nov 5 '12 at 17:41
  • I tried this too, and I'm still getting the same result. Not sure why? – Mike Nov 5 '12 at 18:42
5

What you need to do is to use this syntax.

<CLR red = "255">Text</CLR>

From the Text Formatting help you need to use the Annotation rather than labelling syntax.

I just tested it and it worked!

  • Thanks PolyGeo. What I am trying to do is change the color of the second line in my text. The first line I set using the color selector, but in order to get the second line in a different color, I need to use the tags. – Mike Nov 5 '12 at 18:42
  • As a work around you could add spaces between words, then add another text box on top of it so that it looks like it's flowing text. Hacky, yes, but it should work. – Roy Nov 5 '12 at 18:59
  • Ooops - my answer was wrong and has now been updated (after testing) – PolyGeo Nov 5 '12 at 19:01
4

Not sure why you're experiencing a problem -- it seems to work fine for me. Compare yours against what I have and see if there are any inconsistencies.

enter image description here

3

Are there any special characters (< or &) in your text field? If so, you'll have to replace these special characters. See the code in the help section on replacing them.

Also the code should look like this for basic text

[FIELD1] & vbnewline & "<CLR red = '255'>" & [FIELD2] & "</CLR>"

or if you're using the advance expression

Function FindLabel ( [FIELD1], [FIELD2] )
  FindLabel = [FIELD1] & vbnewline & "<CLR red = '255'>" & [FIELD2] & "</CLR>"
End Function

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.