Titanium Community Questions & Answer Archive

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

Sub and super script in label

Is there any way to format text inside a label?

I need to write CO2 with the 2 sub-scripted. Does a label accept any type of formatting syntaxes?

— asked August 23rd 2010 by Andrew Burgess
  • format
  • label
  • mobile
  • subscript
  • superscript
0 Comments

4 Answers

  • Any response here on this?

    — answered October 14th 2010 by John Pataki
    permalink
    0 Comments
  • The text field is plain text only, it doesn't accept HTML or other formatting.

    — answered October 14th 2010 by John McKnight
    permalink
    0 Comments
  • Yeah, I got this fixed by pasting the UTF-8 character into the text of the label. Only problem is it only works for characters that exist in UTF-8, luckily I just needed a subscript 2 character.

    — answered October 15th 2010 by Andrew Burgess
    permalink
    0 Comments
  • I found out how. I needed to find out how to do TM so I found the C/C++/Java source code for that character. The code for it is: \u2122. So this is how you do it.

    title:'Product\u2122',

    — answered January 22nd 2012 by Casey McLaughlin
    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.