Javascript: TXTextControl.setInputPositionByLocation Method
Description
Sets a new input position from a geometric location.
Syntax
<void> TXTextControl.setInputPositionByLocation(<Point> location, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| location | Specifies a geometric location. The point must be specified in twips with an origin at the top left corner of the control. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TXTextControl.setInputPositionByLocation in a practical document-editing workflow. It sets a new input position from a geometric location.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.setInputPositionByLocation(
{ x: 1440, y: 720 },
function() {
console.log("set input position by location completed.");
},
onTxError
);