TX Text Control .NET Server

Javascript: TXTextControl.getBaseline Method

Method|Introduced in 28.0

Description

Gets the baseline alignment, in twips, of the Text Control.

Syntax

<void> TXTextControl.getBaseline(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

The callback function that receives the requested value.

errorCallback

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

Examples

The following example demonstrates TXTextControl.getBaseline in a practical document-editing workflow. It gets the baseline alignment, in twips, of the Text Control.

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

TXTextControl.getBaseline(
    function(result) {
        console.log("get baseline result:", result);
    },
    onTxError
);