TX Sheet Control

EditorUi.setZoom Method

Method

Sets the worksheet display zoom and returns the applied percentage.

Owner: EditorUi. Package: @txtextcontrol/tx-sheet-control. Version: 2.0.0.

Syntax

setZoom(percent: number): number

Parameters

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

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 property follows the same rules.

This method changes screen zoom independently of print scaling.

See Also