DS Server

Javascript: StatusBarViewGeneratorColors.getForeColor Method

Method|Introduced in 30.0

Description

Gets the color used for text and numbers.

Syntax

<void> StatusBarViewGeneratorColors.getForeColor(<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 StatusBarViewGeneratorColors.getForeColor in a practical document-editing workflow. It gets the color used for text and numbers.

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

function inspectForeColor(statusBarViewGeneratorColors) {
    statusBarViewGeneratorColors.getForeColor(
        function(result) {
            console.log("get fore color result:", result);
        },
        onTxError
    );
}