TX Text Control .NET Server

Javascript: StatusBarViewGenerator.getShowSectionCounter Method

Method|Introduced in 30.0

Description

Specifies whether the status bar shows the number of sections the document consists of.

Syntax

<void> StatusBarViewGenerator.getShowSectionCounter(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the property value.

errorCallback

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

Examples

The following example demonstrates StatusBarViewGenerator.getShowSectionCounter in a practical document-editing workflow. It specifies whether the status bar shows the number of sections the document consists of.

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

TXTextControl.statusBar.getShowSectionCounter(
    function(result) {
        if (result) {
            console.log("get show section counter is available.");
        } else {
            console.warn("get show section counter is not available in the current document state.");
        }
    },
    onTxError
);