TX Text Control .NET Server

Javascript: RulerBarViewGeneratorColors.getBackColor Method

Method|Introduced in 30.0

Description

Gets the background color at the left or top edge of the ruler bar.

Syntax

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

Parameters

ParameterDescription
callback

Receives the color value.

errorCallback

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

Examples

The following example demonstrates RulerBarViewGeneratorColors.getBackColor in a practical document-editing workflow. It gets the background color at the left or top edge of the ruler bar.

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

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