Javascript: TXTextControl.setRenderMode Method
Description
Sets the component render mode. This property only works with the Microsoft Windows based .NET 4 backend. With the platform independent backend, an error is thrown because there is only the SVG based render mode.
Syntax
<void> TXTextControl.setRenderMode(<ComponentRenderMode> value, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| value | The component render mode. |
| 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.setRenderMode in a practical document-editing workflow. It sets the component render mode. This property only works with the Microsoft Windows based .NET 4 backend. With the platform independent backend, an error is thrown because there is only the SVG based render mode.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.setRenderMode(
TXTextControl.ComponentRenderMode.Bitmap,
function() {
console.log("set render mode completed.");
},
onTxError
);