List.parent readonly property
Get the parent object that owns the List.
Example
local ui = require "ui"
-- create a simple window
local win = ui.Window("List.parent sample", 320, 200)
local list = ui.List(win, {'Item 1', "Item 2"}, 115, 60)
local button = ui.Button(win, '"Show List parent"', 96, 30)
list.selected = list.items[1]
function button:onClick()
ui.info("List's parent is "..tostring(list.parent))
end
win:show()
-- update the user interface until the user closes the Window
repeat
ui.update()
until not win.visible