ui.remove(widget)function
Removes a widget from its parent.
Parameters
widget
The widget to be removed.
Return value
This function returns no value.Example
--! luart-extensions
import ui
-- create a simple Window
local win = ui.Window("ui.remove() sample", 320, 230)
-- create a Button on this window
local button = ui.Button(win, "Self-destruction !", 100, 90)
-- Button onClick event : remove the window
function button:onClick()
ui.remove(win)
end
win:show()
-- update the user interface until the user closes the Window
repeat
ui.update()
until not win.visible