---
name: "cbSetChecked"
type: command
status: ok
groups: ["GUI Control"]
arma3_since: "1.12"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/cbSetChecked
revid: 369236
updated: 2024-09-03T10:35:01Z
---

# cbSetChecked

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

## Description

Sets the current state of a CT_CHECKBOX control. Use `"CheckedChanged"` control event handler with it.

## Syntax

```sqf
control cbSetChecked state
```

**Parameters:**

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

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

## Examples

### Example 1

```sqf
_myCheckBox cbSetChecked true;
```

### Example 2

```sqf
_disp = findDisplay 46 createDisplay "RscDisplayEmpty";
_chk = _disp ctrlCreate ["RscCheckBox", -1];
_chk cbSetChecked true;
```

## See also

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

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