object:setEnabled()

Type Function
Library widget.*
Return value none
Revision 2017.3060
Keywords widget, button, ButtonWidget, setEnabled
See also widget.newButton()
ButtonWidget

Overview

Sets the ButtonWidget as either enabled or disabled.

Syntax

object:setEnabled( isEnabled )
isEnabled (required)

Boolean. Set this to false if you wish to disable touch events on the button, true if you wish to re-enable the button's ability to receive touch events.

Example

myButton:setEnabled( false )  -- The button will no longer receive touch events.