【发布时间】:2017-04-11 08:20:21
【问题描述】:
大家: 这是我的问题,当我单击时,我试图在 TableView 中显示选定行的内容。
在onRowRender中我通过这种方式添加行,
local function onRowRender( event )
local row = event.row
local myText = ""
local myText = display.newText(row,"Text to show",150,row.contentHeight/2,native.systemFontBold,30 )
end
在 onRowTouch 事件中我已经尝试过了,
local function onRowTouchTable( event )
print(menuPedidos._view._rows[row.index]) //it return a table, I assumed the row selected
print(menuPedidos._view._rows[row.index].mytext) //it return nil
end
而我需要的是保存在对象 mytext
中的文本如果有任何帮助,我将不胜感激,谢谢
【问题讨论】:
标签: android lua widget tableview coronasdk