Skip to content

Instantly share code, notes, and snippets.

@mauropm
Created December 22, 2011 19:08
Show Gist options
  • Save mauropm/1511446 to your computer and use it in GitHub Desktop.
Save mauropm/1511446 to your computer and use it in GitHub Desktop.
Two Labels per Row in a Table
var win = Ti.UI.createWindow({
title:'testing labels',
});
var row=Ti.UI.createTableViewRow({
layout:'vertical',
height:'auto'
});
var firstLabel= Ti.UI.createLabel({
top:10,
left:15,
right:15,
height:'auto',
color:'#363636',
text:'This is First Label in the Row' });
var secondLabel= Ti.UI.createLabel({
top:10,
left:15,
right:15,
height:'auto',
color:'#363636',
text:'This is Second Label in the Row' });
row.add(firstLabel);
row.add(secondLabel);
var data = [];
data[0]=row;
var table=Ti.UI.createTableView({
data:data,
});
win.add(table);
win.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment