TX Text Control .NET Server

Javascript: Selection.setBounds Method

MethodDeprecated|Introduced in 24.0

Description

Obsolete. This method will be removed in one of the next versions. Sets the selection's start position and length.

Syntax

<void> Selection.setBounds(<SelectionBounds> bounds, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
bounds

Selection start position and length.

callback

Optional. Is called when the operation completed.

errorCallback

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

Examples

The following example demonstrates Selection.setBounds in a practical document-editing workflow. Obsolete. This method will be removed in one of the next versions. Sets the selection's start position and length.

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

TXTextControl.selection.setBounds(
    { start: 1, length: 5 },
    function() {
        console.log("set bounds completed.");
    },
    onTxError
);