Window.visible read/write property


Get or set the window visibility on screen, a true value means that the window is shown, a false value means that the window is hidden.

Example

local ui = require "ui" -- create a simple window local win = ui.Window("Window.visible sample", 320, 200) local button = ui.Button(win, "Click to hide window") local can_exit = false -- hides the window and shows it again after 1 sec function button:onClick() win.visible = false sleep(1000) win.visible = true end ui.run(win):wait()