The picture.visible property is also affected by the Picture:show() and Picture:hide() methods.
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 Picture
repeat
ui.update()
until not win.visible