I found the solution. It was posted by robmiracle here - http://developer.coronalabs.com/reference/index/widgetnewtableview?page=1&destination=
[code]
local widget = require “widget”
local listOptions = {
top = display.statusBarHeight,
height = 410,
maskFile = “mask-410.png”
}
local list = widget.newTableView( listOptions )
local function onRowRender( event )
local row = event.target
local rowGroup = event.view
local text = display.newRetinaText( data[row.index].thing, 12, 0, “Helvetica-Bold”, 18 )
text:setReferencePoint( display.CenterLeftReferencePoint )
text.y = row.height * 0.5
– must insert everything into event.view:
rowGroup:insert( text )
end
for i=1,#data do
list:insertRow{
onEvent=onRowTouch,
onRender=onRowRender,
}
end
[/code] [import]uid: 90818 topic_id: 28961 reply_id: 116625[/import]