TX Text Control .NET Server

Javascript: Barcode.getBackColor Method

Method|Introduced in 28.0

Description

Gets the background color of the barcode control.

Syntax

<void> Barcode.getBackColor(<RequestStringCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the color string as a CSS color string.

errorCallback

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

Examples

The following example demonstrates Barcode.getBackColor in a practical document-editing workflow. It gets the background color of the barcode control.

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

function inspectBackColor(barcode) {
    barcode.getBackColor(
        function(result) {
            console.log("get back color result:", result);
        },
        onTxError
    );
}