# Javascript: TXTextControl.setRenderMode Method

> 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.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 32.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: TXTextControl.setRenderMode Method
- **387 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/setrendermode-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/setrendermode-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/setrendermode-method/llms-full.txt

---

### 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

```javascript
<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.

```javascript
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
);
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.setPermanentControlChars Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/setpermanentcontrolchars-method/llms-full.txt)
- **Next:** [Javascript: TXTextControl.setSelectObjects Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol/setselectobjects-method/llms-full.txt)
