The edit.visible property is also affected by the Edit:show() and Edit:hide() methods.
Edit.visible read/write property
Get or set the edit visibility on screen, a true value means that the Edit is shown, a false value means that the Edit is hidden.
Example
local ui = require "ui"
-- create a simple edit
local win = ui.Window("Edit.visible sample", 320, 200)
local edit = ui.Edit(win, "", 10, 44, 300, 150)
local button = ui.Button(win, "Click to hide Edit", 110, 10)
edit.rtf = true
edit.font = "Impact"
edit.fontsize = 24
edit.selection.align = "center"
edit:append("\nLuaRT")
-- hides the edit and shows it again after 2 sec
function button:onClick()
edit.visible = false
button.enabled = false
sleep(2000)
button.enabled = true
edit.visible = true
end
ui.run(win):wait()