position vertical labels
hi all,
we search a posibilty to set the positions of labels…
so we put different text (different lenghts) into labels. so the high of this label must be dynamic.
example
var win = Titanium.UI.currentWindow;
var body = Ti.UI.createView({height:'auto'});
var Label1 = Ti.UI.createLabel({
color:'green',
top:10,
height:'auto',
text:'Lorem ipsum dolor sit amet, consetetur sadipscing
elitr, sed diam nonumy eirmod
tempor invidunt ut labore et dolore
magna aliquyam erat,
sed diam voluptua'});
body.add(Label1);
var Label2 = Ti.UI.createLabel({
color:'red',
top:Label1.size.height,
height:'auto',
text:'At vero eos et accusam et justo duo
dolores et ea rebum. Stet clita kasd
gubergren, no sea takimata sanctus est
Lorem ipsum dolor sit amet'});
body.add(Label2);
win.add(body);
if we check the Label1.size.height we become 0!
can anybody help us????
thx
1 Answer
-
Accepted Answer
Looks like what you really want here is a vertical layout - check out this code for an example of how to create this: