Javascript: TextViewGeneratorColors.setActiveFormFieldColor Method
Description
Sets the highlight color of a form field containing the current text input position. To suppress highlighting the active FormField the property value can be set to null.
Syntax
<void> TextViewGeneratorColors.setActiveFormFieldColor(<string> color, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| color | The highlight color. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TextViewGeneratorColors.setActiveFormFieldColor in a practical document-editing workflow. It sets the highlight color of a form field containing the current text input position. To suppress highlighting the active FormField the property value can be set to null.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.displayColors.setActiveFormFieldColor(
"#ffd54f",
function() {
console.log("set active form field color completed.");
},
onTxError
);