Progressbar.visible read/write property


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

Example

local ui = require "ui" -- create a simple pb local win = ui.Window("Progressbar.visible sample", 320, 200) local pb = ui.Progressbar(win) pb:center() pb.y = 40 local button = ui.Button(win, "Click to Hide Progressbar") button:center() pb.font = "Impact" pb.fontsize = 24 -- hides the pb and shows it again after 2 sec function button:onClick() pb.visible = false button.enabled = false sleep(2000) button.enabled = true pb.visible = true end ui.run(win):wait()