Javascript: Selection.setBounds Method
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
| Parameter | Description |
|---|---|
| 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
);