Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Label with text color per word?

In HTML I can set the text per word using the font tag, useful when I don't know the length of text ahead of time, makes alignment easy. I'm in a situation where I have a block of text, I need to change the color of the first few words however I'm having trouble using separate labels to do so because I can't maintain alignment of the labels within a row since the first varies in length. Is it possible to set the color on a portion of the label text?

— asked October 14th 2010 by Brian Raymond
  • color
  • label
0 Comments

2 Answers

  • Accepted Answer

    With the current Titanium Label API you cannot change the font color of specific letters/words. Sucks, I know, but I believe they want to add that support in the future.

    — answered October 14th 2010 by Colton Arabsky
    permalink
    1 Comment
    • This sucks really …

      — commented August 13th 2011 by Peter Linzenkirchner
  • In android (only), labels have a html property you can use in lieu of the text property. I haven't tried it, but that may let you achieve it under Android. However, with iOS you are SOL.

    — answered August 13th 2011 by Doug Handy
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.