Combobox.visible read/write property


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

Example

local ui = require "ui" -- create a simple combobox local win = ui.Window("Combobox.visible sample", 320, 200) local combobox = ui.Combobox(win, {"LuaRT"}, 120, 70) local button = ui.Button(win, "Click to hide combobox", 110, 10) combobox.font = "Impact" combobox.fontsize = 24 combobox.selected = combobox.items[1] function button:onClick() -- hides the calendar combobox.visible = false button.enabled = false -- and shows it again after 2 sec sleep(2000) button.enabled = true combobox.visible = true end -- update the user interface until the user closes the Window ui.run(win):wait()