Label.enabled read/write property
Get or set the label ability to respond to mouse, and any other events. When set to false, disable the Label (the user will not be able to interact with it), and label's events won't be fired anymore.
Example
local ui = require "ui"
-- create a simple Window
local win = ui.Window("Label.enabled sample", 320, 200)
local label = ui.Label(win, "I'm disabled :(", 130, 80)
-- disable the label
label.enabled = false
win:show()
-- label:onClick() event (won't be fired !)
function label:onClick()
ui.info("You have clicked on the label !!")
end
-- update user interface
repeat
ui.update()
until not win.visible