---
name: "ctrlDelete"
type: command
status: ok
groups: ["GUI Control"]
arma3_since: "1.26"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/ctrlDelete
revid: 337526
updated: 2023-02-05T19:30:47Z
---

# ctrlDelete

*Command · GUI Control · Arma 3 v1.26*

## Description

Deletes given control. The control has to be created either by script with [ctrlCreate](../commands/ctrlCreate.md) or to have `deletable` property in config set to 1. Use [ctrlShow](../commands/ctrlShow.md) [false](../commands/false.md) and [ctrlEnable](../commands/ctrlEnable.md) [false](../commands/false.md) to disable controls that cannot be deleted. Returns [Boolean](../topics/Boolean.md) indicating  whether the deletion was successful.

> [!WARNING]
> Using [ctrlDelete](../commands/ctrlDelete.md) in a [UI eventhandler](../topics/User_Interface_Event_Handlers.md) called by the to be deleted control will crash the game! This also happens when a controls group is deleted that contains the "calling" control.

## Syntax

```sqf
ctrlDelete control
```

**Parameters:**

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

**Returns:** [Boolean](../topics/Boolean.md)

## Examples

### Example 1

```sqf
ctrlDelete ((findDisplay 20000) displayCtrl 20001);
```

## See also

[ctrlCreate](../commands/ctrlCreate.md) · [ctrlModel](../commands/ctrlModel.md) · [ctrlSetModel](../commands/ctrlSetModel.md) · [ctrlPosition](../commands/ctrlPosition.md) · [ctrlSetPosition](../commands/ctrlSetPosition.md) · [ctrlClassName](../commands/ctrlClassName.md) · [displayCtrl](../commands/displayCtrl.md) · [ctrlModelScale](../commands/ctrlModelScale.md) · [ctrlSetModelScale](../commands/ctrlSetModelScale.md) · [ctrlModelDirAndUp](../commands/ctrlModelDirAndUp.md) · [ctrlSetModelDirAndUp](../commands/ctrlSetModelDirAndUp.md)

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