Javascript: TXTextControl.getSelectObjects Method
Description
Gets a value controlling the selection of objects which are inserted behind the text. When the property is set to true, a mouse click selects the object behind the text. Otherwise, when this property is set to false, text in front of the object can be selected.
Syntax
<void> TXTextControl.getSelectObjects(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives whether the option is active. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TXTextControl.getSelectObjects in a practical document-editing workflow. It gets a value controlling the selection of objects which are inserted behind the text. When the property is set to true, a mouse click selects the object behind the text. Otherwise, when this property is set to false, text in front of the object can be selected.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.getSelectObjects(
function(result) {
if (result) {
console.log("get select objects is available.");
} else {
console.warn("get select objects is not available in the current document state.");
}
},
onTxError
);