TX Text Control .NET Server

Javascript: TXTextControl.setActivationState Method

Method|Introduced in 28.0

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

ParameterDescription
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
);