Label.parent readonly property


Get the parent object that owns the Label.

Example

local ui = require "ui" -- create a simple window local win = ui.Window("Label.parent sample", 320, 200) local label = ui.Label(win, "Hello World !", 130, 80) local button = ui.Button(win, "Show Label parent", 100, 10) function button:onClick() ui.info("Label's parent is "..tostring(label.parent)) end win:show() -- update the user interface until the user closes the Window repeat ui.update() until not win.visible