# EditorUi.setZoom Method

> EditorUi.setZoom method in the TX Sheet Control TypeScript API for the browser: Sets the worksheet display zoom and returns the applied percentage.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Method
- **Path:** TX Sheet Control > API Reference > TypeScript API > Browser Editor > EditorUi > EditorUi.setZoom Method
- **419 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/editorui/setzoom-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/editorui/setzoom-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/editorui/setzoom-method/llms-full.txt

---

Sets the worksheet display zoom and returns the applied percentage.

Owner: [EditorUi](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/editorui/llms-full.txt). Package: `@txtextcontrol/tx-sheet-control`. Version: **2.0.0**.

### Syntax

```typescript
setZoom(percent: number): number
```

### Parameters

| Parameter | Type | Optional | Description |
|---|---|---|---|
| `percent` | `number` | No | Finite zoom percentage. Rounded to a whole percentage and clamped to 25–400. |

### Return Value

The applied whole-number percentage, from 25 through 400.

### Examples

Pass an existing EditorUi from the owning document. Related handles and input bytes must belong to the intended document and application; the function applies the operation and inspects its result.

```typescript
import type { EditorUi } from '@txtextcontrol/tx-sheet-control';

function applyEditorUiSetZoom(editorUi: EditorUi) {
    const result = editorUi['setZoom'](110);
    console.log(result);
}
```

### Remarks

A nonfinite `percent` raises `TypeError`. Finite values below 25 apply 25 percent; values above 400 apply 400 percent. The writable [zoom](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/editorui/zoom-property/llms-full.txt) property follows the same rules.

This method changes screen zoom independently of print scaling.

### See Also

- [EditorUi Interface](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/editorui/llms-full.txt)
- [Workbooks and Worksheets](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/workbooks/llms-full.txt)

---

## Nearby

- **Previous:** [EditorUi.setViewMode Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/editorui/setviewmode-method/llms-full.txt)
- **Next:** [EditorUi.theme Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/editorui/theme-property/llms-full.txt)
