object:setEnabled()

Type Function
Library widget.*
Return value none
Revision Release 2022.3683
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.