Titanium Community Questions & Answer Archive

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

Multiline Label?

Hello there,
maybe this is a very dumb question, but i'm trying to add a multiline text into a table row.
i'm not sure if i'm doing it right.

is there a way to make a label being multiline?

— asked August 20th 2010 by Ju Ho
  • label
  • multiline
0 Comments

2 Answers

  • Accepted Answer

    Like Clifton said, if you have a long sentence or a paragraph you simply have to set the width/height of the label and it will wrap, but if you need a line wrap and you aren't anywhere near the edge of the page simply put a "\n" before the word you want wrapped and it will wrap.

    — answered August 20th 2010 by Colton Arabsky
    permalink
    1 Comment
    • If you have minFonSize set, then it will first try to fit using that font size. I didn't test if it finally wraps but don't think so, specially if you also set ellipsize to true. Remove those 2 properteis and it will work.

      — commented July 18th 2012 by Roger Mabillard
  • Just set the width and height of the label and it will automatically wrap to multiple lines within the space you designate.

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