Edit.parent readonly property


Get the parent object that owns the Edit.

Example

local ui = require "ui" -- create a simple window local win = ui.Window("Edit.parent sample", "fixed", 340, 230) local button = ui.Button(win, "Show parent", 5, 10) local edit = ui.Edit(win, "", button.x + button.width + 4, button.y) -- set edit.properties edit.font = "Times New Roman" edit.fontsize = 10 edit.wordwrap = true edit.text = [[Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.]] function button:onClick() ui.info("Edit's parent is "..tostring(edit.parent)) end win:show() -- update the user interface until the user closes the Window repeat ui.update() until not win.visible