Index | Collapse All Expand All

SetEnabled Method
Control Class Members Examples See Also

Beta Documentation - Subject to change.
Sets a flag indicating if the control is enabled.

# Syntax

Lua
    function Control:SetEnabled(value);

#### Parameters

value
  Type: boolean
  True if the control is to be enabled, false to disable.

# Remarks

Sets a flag indicating if the control is enabled. The enabled state is used to determine how a control can be interacted with by the user, typically ignoring user actions while disabled.

# Examples

This example display a disabled button.

Disable a control | Copy Code
--- | ---
            window = Turbine.UI.Lotro.Window();
            window:SetVisible( true );
            window:SetPosition( 200, 200 );
            window:SetSize( 300, 200 );

            button = Turbine.UI.Button();
            button:SetParent( button );
            button:SetText( "Disabled " );
            button:SetPosition( 20, 50 );
            button:SetSize( 100, 25 );
            button:SetEnabled( false );

# See Also

- Control
- Turbine.UI