GuiSetDisabled
Jump to navigation
Jump to search
guiSetDisabled
Enables or disables an RML form control.
Syntax
bool guiSetDisabled(DocumentHandle document, string elementId, bool disabled)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
document |
DocumentHandle |
yes | The owning RML document handle. |
elementId |
string |
yes | The id of an RML form control. |
disabled |
bool |
yes | True to disable the control or false to enable it. |
Returns
Returns true when the target is a valid form control and its state is changed; otherwise returns false.
Examples
Disable a submit button while waiting for the server:
guiSetDisabled(loginWindow, "submit", true)
triggerServerEvent("account:login", resourceRoot, username, password)
Notes
- Available only in client-side resource scripts.
- The target must derive from an RmlUi form-control element.