---
name: "BIS_fnc_ctrlFitToTextHeight"
type: function
status: ok
groups: ["GUI"]
arma3_since: "1.00"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_ctrlFitToTextHeight
revid: 349284
updated: 2023-11-08T14:51:14Z
---

# BIS_fnc_ctrlFitToTextHeight

*Function · GUI · Arma 3 v1.00*

## Description

Resize structured text control to fit its text height.

## Syntax

```sqf
[control,offset,time] call BIS_fnc_ctrlFitToTextHeight
```

**Parameters:**

- `control`: [Control](../topics/Control.md) - the control which should be scaled
- `offset`: [Number](../topics/Number.md) - (Optional, default 0) offset
- `time`: [Number](../topics/Number.md) - (Optional, default 0) commit time

**Returns:** [Number](../topics/Number.md) - text height

## Examples

### Example 1

```sqf
private _height = [_ctrl, 1.5, 3] call BIS_fnc_ctrlFitToTextHeight;
```

## See also

[ctrlCommitted](../commands/ctrlCommitted.md) · [ctrlSetPosition](../commands/ctrlSetPosition.md) · [ctrlSetFade](../commands/ctrlSetFade.md)

<sub>Source: [BI Community Wiki — BIS fnc ctrlFitToTextHeight](https://community.bistudio.com/wiki/BIS_fnc_ctrlFitToTextHeight) (revision 349284).</sub>
