TX Text Control .NET Server

Javascript: SectionFormat.getEqualColumnWidth Method

Method|Introduced in 26.0

Description

Gets a value indicating whether the columns on a page have all the same width and the same distance between them. If this property is set to true, the width of the columns are automatically calculated from the page size.

Syntax

<void> SectionFormat.getEqualColumnWidth(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives a value indicating whether the columns on a page have all the same width and the same distance between them.

errorCallback

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

Examples

The following example demonstrates SectionFormat.getEqualColumnWidth in a practical document-editing workflow. It gets a value indicating whether the columns on a page have all the same width and the same distance between them. If this property is set to true, the width of the columns are automatically calculated from the page size.

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

function inspectEqualColumnWidth(sectionFormat) {
    sectionFormat.getEqualColumnWidth(
        function(result) {
            if (result) {
                console.log("get equal column width is available.");
            } else {
                console.warn("get equal column width is not available in the current document state.");
            }
        },
        onTxError
    );
}