Titanium Community Questions & Answer Archive

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

Bold one word in label

I'm trying to find out if anyone knows how to do this. I will have a sentence in a iPad app giving the user the result.

It wil be like…

This is a test, you scored 1234.45 more then 857.24.

I would like the 2 numbers in that sentence to be bold.

I'm not quite sure how to do that. Does anyone know how to do this?


— asked August 20th 2010 by donovan lewis
  • bold
  • custom
  • font
  • label
  • I would also really like to know how to do this. Multiple times in my Apps I need to know how to do things like this (Italicize, bold, etc. one word in a label). It seems that it can't be done without adding separate labels and placing them side-by-side, as Chris Reed said.

    — commented August 20th 2010 by Colton Arabsky
  • I have the same problem!

    — commented February 20th 2012 by Mauricio Rodrigues
  • Also having this problem. It would be great if we could bold a single word in a label with a <strong> tag or something.

    — commented May 31st 2012 by Joshua Lambert
  • Is there still no way to do this? It's a pretty big thing to completely miss out.

    — commented July 23rd 2012 by Luke Peek

2 Answers

  • In Android, label objects can use HTML by setting the html property instead of the text property. However, iOS does not support that property. Another option would be to use the Styled Label Module from the marketplace, since it supports both iOS and Android.

    — answered May 31st 2012 by Doug Handy
  • Hi Donovan, I can only think of two ways to do that:

    1. Chop the text into multiple labels and place them side-by-side, which could be tricky
    2. Use a little webview and apply CSS


    — answered August 20th 2010 by Chris Reed
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.