Tree.visible read/write property


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

Example

local ui = require "ui" -- create a simple tree local win = ui.Window("Tree.visible sample", 320, 240) local tree = ui.Tree(win, {"Item1", "Item2", "Item3"}, 100, 70) local button = ui.Button(win, "Click to hide tree", 106, 10) -- hides the tree and shows it again after 2 sec function button:onClick() tree.visible = false button.enabled = false sleep(2000) button.enabled = true tree.visible = true end ui.run(win):wait()