Picture.visible read/write property


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

Example

local ui = require "ui" -- create a simple picture local win = ui.Window("Picture.visible sample", 360, 210) local picture = ui.Picture(win, "examples/LuaRT.png", -66) local button = ui.Button(win, "Click to hide picture", 120, 170) picture.font = "Impact" picture.fontsize = 24 -- hides the picture and shows it again after 2 sec function button:onClick() picture.visible = false button.enabled = false sleep(2000) button.enabled = true picture.visible = true end win:show() -- update the user interface until the user closes the picture repeat ui.update() until not win.visible