Edit.enabled read/write property
Get or set the edit ability to respond to mouse, and any other events. When set to false, disable the Edit (the user will not be able to interact with it), and edit's events won't be fired anymore.
Example
local ui = require "ui"
-- create a fixed Window to hold the buttons
local win = ui.Window("Edit:enabled() sample", "fixed", 340, 230)
local label = ui.Label(win, "Enter text : ", 10, 10)
local edit = ui.Edit(win, "", label.x + label.width + 8, label.y)
-- add some text
edit.text = "\n\n\n\n\n\n\n\t This Edit is disabled !"
-- disable the edit
edit.enabled = false
win:show()
-- edit:onClick() event (won't be fired !)
function edit:onClick()
ui.info("You have clicked on the edit !!")
end
-- update user interface
repeat
ui.update()
until not win.visible