类型 函数 库 widget.* 返回值 GroupObject 修订版 发行版 2024.3703 关键字 表格视图、列表视图、TableViewWidget、getRowAtIndex 另请参阅 widget.newTableView() TableViewWidget
返回对 TableViewWidget 中特定可见行的行组的引用。
object:getRowAtIndex( rowIndex )
Number. 行的索引。
rowIndex
值必须在表格视图中行的范围内。
如果行当前在表格视图中不可见,则此函数将返回 nil
。
local rowIndex = 4 if ( tableView:getNumRows() >= rowIndex ) then local ind = tableView:getRowAtIndex( rowIndex ) if ( ind ) then print( "Row group:", ind ) else print( "Row "..rowIndex.." is not currently visible!" ) end end