Button.enabled readwrite


Get or set the button ability to respond to mouse, and any other events. When set to false, disable the Button (the user will not be able to interact with it), and button's events won't be fired anymore.

Example

--! luart-extensions import ui -- create a simple Window local win = ui.Window("Button.enabled sample", 320, 200) local button = ui.Button(win, "I'm disabled :(", 130, 80) -- disable the button button.enabled = false win:show() -- button:onClick() event (won't be fired !) function button:onClick() ui.info("You have clicked on the button !!") end -- update user interface repeat ui.update() until not win.visible