Javascript: TXTextControl.setActivationState Method
Description
Sets a value indicating the current activation state. It can be activated, deactivated or disabled.
Syntax
<void> TXTextControl.setActivationState(<ActivationState> activationState, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| activationState | Indicates the current activation state. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TXTextControl.setActivationState in a practical document-editing workflow. It sets a value indicating the current activation state. It can be activated, deactivated or disabled.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.setActivationState(
TXTextControl.ActivationState.Activated,
function() {
console.log("set activation state completed.");
},
onTxError
);