Javascript: TextFormField.getEmptyWidth Method
Description
Gets the horizontal extension, in twips, of the text formfield, when it is empty.
Syntax
<void> TextFormField.getEmptyWidth(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives the horizontal extension, in twips, of the text formfield, when it is empty. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TextFormField.getEmptyWidth in a practical document-editing workflow. It gets the horizontal extension, in twips, of the text formfield, when it is empty.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function inspectEmptyWidth(textFormField) {
textFormField.getEmptyWidth(
function(result) {
console.log("get empty width result:", result);
},
onTxError
);
}