TX Text Control .NET Server

Javascript: Barcode.setUpperTextLength Method

Method|Introduced in 28.0

Description

Sets the maximum text length.

Syntax

<void> Barcode.setUpperTextLength(<number> value, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
value

The upper text length.

callback

Optional. Is called when the operation completed.

errorCallback

Optional. Is called when the operation failed with an error.

Examples

The following example demonstrates Barcode.setUpperTextLength in a practical document-editing workflow. It sets the maximum text length.

function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

function configureUpperTextLength(barcode) {
    barcode.setUpperTextLength(
        1,
        function() {
            console.log("set upper text length completed.");
        },
        onTxError
    );
}