Disabled Control
Note:
Currently in the beta phase.
Determines whether a component is interactive. When interactive, it responds to click events, touch events, key events, focus events, and mouse events.
Note:
The disabled control property only takes effect when pressed. Changing the
enabledproperty during an ongoing interaction has no effect.
Import Module
import kit.ArkUI.*
func enabled(?Bool)
func enabled(value: ?Bool): T
Function: Sets whether the component is enabled.
System Capability: SystemCapability.ArkUI.ArkUI.Full
Since: 22
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| value | ?Bool | Yes | - | true: The component is interactive and responds to operations like clicks.false: The component is non-interactive and does not respond to operations like clicks.Initial value: true |
Return Value:
| Type | Description |
|---|---|
| T | Returns the component instance itself that calls this interface. |