Titanium Community Questions & Answer Archive

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

Relative positions of labels

Hi,

I would like to know whether it is possible to set the position of labes relative.

I got a label which gets data from a api, and it can be only one line or even 3 lines of text.

All of my other labels should go down relative to the size of my top label.

Is there a property in titanium that does this? Or knows anybody an other way to do this?

Greetings,
Michael

— asked June 10th 2010 by Michael Gajda
  • iphone
  • label
  • mobile
  • positions
  • relative
  • text
0 Comments

2 Answers

  • Hello Kevin,

    i think this idea is nearly what i wanted.

    Let me make a example:

    topLabel.top= 5; 
    secondLabel.top = (toplabel.bottom + 10);
    

    I hope it is clear what i want to do?

    my topLabel can have a height of 10 or 20 or … put in a number. Now my second Label should be 10px under my topLabel.

    — answered June 11th 2010 by Michael Gajda
    permalink
    2 Comments
    • That's exactly what the vertical layout view does.

      — commented June 11th 2010 by Sj Singh
    • Ok then i have put in a mistake in my code, i will have a look at this!

      — commented June 14th 2010 by Michael Gajda
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.