---
name: "ctrlSetChecked"
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/ctrlSetChecked
revid: 330383
updated: 2022-09-04T21:37:19Z
---

# ctrlSetChecked

*Command · GUI Control · Arma 3 v0.50*

## Description

Sets checked state of a CT_CHECKBOXES control.

## Syntax

### Syntax 1

```sqf
control ctrlSetChecked checked
```

**Parameters:**

- `control`: [Control](../topics/Control.md) - CT_CHECKBOXES control. If control contain multiple checkboxes, only checkbox with index 0 is queried.
- `checked`: [Boolean](../topics/Boolean.md) - [true](../commands/true.md) to check, [false](../commands/false.md) to uncheck the checkbox

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

### Syntax 2

*since arma3 1.72*

```sqf
control ctrlSetChecked [index, checked]
```

**Parameters:**

- `control`: [Control](../topics/Control.md) - CT_CHECKBOXES control
- `index`: [Number](../topics/Number.md) - checkbox index
- `checked`: [Boolean](../topics/Boolean.md) - [true](../commands/true.md) to check, [false](../commands/false.md) to uncheck the checkbox

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

## Examples

### Example 1

```sqf
_control ctrlSetChecked true;
```

### Example 2

```sqf
_control ctrlSetChecked [3, true];
```

## See also

[ctrlChecked](../commands/ctrlChecked.md) · [cbChecked](../commands/cbChecked.md) · [cbSetChecked](../commands/cbSetChecked.md)

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