---
name: "ctrlText"
type: command
status: ok
groups: ["GUI Control"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/ctrlText
revid: 378493
updated: 2026-04-26T15:11:35Z
---

# ctrlText

*Command · GUI Control · Arma 3 v0.50 · introduced in Operation Flashpoint v1.75*

## Description

Returns the text of a control of the currently active user dialog. This command can be used on static texts, buttons, edit lines and active texts as well as for images, where it returns the image path. Does not work on HTML control and returns empty string "". Since Arma 3 v2.05 supported control types are:
- CT_STATIC

- CT_EDIT
- CT_XKEYDESC
- CT_XBUTTON
- CT_SHORTCUTBUTTON
- CT_STRUCTURED_TEXT
- CT_BUTTON
- CT_ACTIVETEXT

Since Arma 3 v2.20 CT_PROGRESS is also supported.

## Syntax

### Syntax 1

```sqf
ctrlText idc
```

**Parameters:**

- `idc`: [Number](../topics/Number.md) - control ID

**Returns:** [String](../topics/String.md) - the text or image path or texture is returned, dependent on the control type

### Syntax 2

```sqf
ctrlText controlName
```

**Parameters:**

- `controlName`: [Control](../topics/Control.md) - control

**Returns:** [String](../topics/String.md) - the text or image path or texture is returned, dependent on the control type

## Examples

### Example 1

```sqf
_text = ctrlText 100;
```

### Example 2

```sqf
_text = ctrlText _control;
```

## See also

[ctrlTextSecondary](../commands/ctrlTextSecondary.md) · [ctrlSetText](../commands/ctrlSetText.md) · Arma: GUI Configuration

<sub>Source: [BI Community Wiki — ctrlText](https://community.bistudio.com/wiki/ctrlText) (revision 378493).</sub>
