TX Text Control .NET Server

Javascript: RulerBarViewGeneratorColors.resetRulerColor Method

Method|Introduced in 30.0

Description

Resets the ruler bar's rulerColor to its system dependent default value.

Syntax

<void> RulerBarViewGeneratorColors.resetRulerColor([<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Optional. Is called when the operation completed.

errorCallback

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

Examples

The following example demonstrates RulerBarViewGeneratorColors.resetRulerColor in a practical document-editing workflow. Resets the ruler bar's rulerColor to its system dependent default value.

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

function resetRulerColor(rulerBarViewGeneratorColors) {
    rulerBarViewGeneratorColors.resetRulerColor(
        function() {
            console.log("reset ruler color completed.");
        },
        onTxError
    );
}