The Panel.visible property is also affected by the Panel:show() and Panel:hide() methods.
Panel.visible read/write property
Get or set the Panel visibility on screen, a true value means that the Panel is shown, a false value means that the Panel is hidden.
Example
local ui = require "ui"
-- create a fixed Window
local win = ui.Window("Panel.visible sample", "fixed", 320, 200)
-- create a Panel
local panel = ui.Panel(win, 0, 0, 100, 100)
panel.bgcolor = 0xF0A000
panel:center()
async(function()
while true do
sleep(1000)
panel.visible = not panel.visible
end
end)
ui.run(win):wait()