TX Text Control .NET Server

Javascript: PageBorder.setTopLineWidth Method

Method|Introduced in 26.0

Description

Sets the width of the top border line.

Syntax

<void> PageBorder.setTopLineWidth(<number> topLineWidth, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
topLineWidth

The width of the top border line.

callback

Optional. Is called when the operation completed.

errorCallback

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

Examples

The following example demonstrates PageBorder.setTopLineWidth in a practical document-editing workflow. It sets the width of the top border line.

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

function configureTopLineWidth(pageBorder) {
    pageBorder.setTopLineWidth(
        1440,
        function() {
            console.log("set top line width completed.");
        },
        onTxError
    );
}