TX Text Control .NET Server

Javascript: PageBorder.setTopLineColor Method

Method|Introduced in 26.0

Description

Sets the color of the top border line.

Syntax

<void> PageBorder.setTopLineColor(<string> topLineColor, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
topLineColor

The color 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.setTopLineColor in a practical document-editing workflow. It sets the color of the top border line.

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

function configureTopLineColor(pageBorder) {
    pageBorder.setTopLineColor(
        "#ffd54f",
        function() {
            console.log("set top line color completed.");
        },
        onTxError
    );
}