Checkbox.parent readonly property


Get the parent widget that owns the Checkbox.

Example

local ui = require "ui" -- create a simple window local win = ui.Window("Checkbox.parent sample", 320, 200) -- create a Tab with one page local tab = ui.Tab(win, {"Page 1"}) -- create a checkbox on the first page local checkbox = ui.Checkbox(tab.items[1], "Show Checkbox parent", 90, 70) function checkbox:onClick() ui.info("Checkbox's parent is a "..type(checkbox.parent)) end tab.align = "all" win:show() -- update the user interface until the user closes the Window repeat ui.update() until not win.visible