---
name: "CT CHECKBOX"
type: topic
aliases: ["DialogControls-CheckBox"]
source: https://community.bistudio.com/wiki/CT_CHECKBOX
revid: 342180
updated: 2023-07-09T12:26:56Z
---

# CT CHECKBOX

### Introduction

A toggleable control. There are two states that can be switched between: Checked and Unchecked.

#### Related commands & functions

- Commands: General
- Commands: UI Eventhandlers
- [cbSetChecked](../commands/cbSetChecked.md)
- [cbChecked](../commands/cbChecked.md)

#### Related User Interface Eventhandlers

- [Events: General](../topics/User_Interface_Event_Handlers.md#generic-events)
- [Events: Checkbox](../topics/User_Interface_Event_Handlers.md#checkbox-events)

### Alphabetical Order

> [!NOTE]
> TokenNames common to most controls, such as x, y, w, h, text, idc... can be found [**here**](../topics/Arma~3A_GUI_Configuration.md#common-properties).

> [!WARNING]
> Not all of the listed attributes might have an effect nor might the list be complete. All attributes were gathered with [this](https://github.com/7erra/BIKI.VR/blob/master/fnc/generateCTPage.sqf) config crawler.

```cpp
#define CT_CHECKBOX 77
```

#### C

##### checked

**Type:** Number

**Description:** Default state of the control. Can be either 0 or 1.

```cpp
checked = 0;
```

##### color

**Type:** Array

**Description:** n/a

```cpp
color[] = {1,1,1,0.7};
```

##### colorBackgroundDisabled

**Type:** Array

**Description:** n/a

```cpp
colorBackgroundDisabled[] = {0,0,0,0};
```

##### colorBackgroundFocused

**Type:** Array

**Description:** n/a

```cpp
colorBackgroundFocused[] = {0,0,0,0};
```

##### colorBackgroundHover

**Type:** Array

**Description:** n/a

```cpp
colorBackgroundHover[] = {0,0,0,0};
```

##### colorBackgroundPressed

**Type:** Array

**Description:** n/a

```cpp
colorBackgroundPressed[] = {0,0,0,0};
```

##### colorFocused

**Type:** Array

**Description:** n/a

```cpp
colorFocused[] = {1,1,1,1};
```

##### colorHover

**Type:** Array

**Description:** n/a

```cpp
colorHover[] = {1,1,1,1};
```

##### colorPressed

**Type:** Array

**Description:** n/a

```cpp
colorPressed[] = {1,1,1,1};
```

#### S

##### soundClick

**Type:** Array

**Description:** n/a

```cpp
soundClick[] = {"",0.1,1};
```

##### soundEnter

**Type:** Array

**Description:** n/a

```cpp
soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1};
```

##### soundEscape

**Type:** Array

**Description:** n/a

```cpp
soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1};
```

##### soundPush

**Type:** Array

**Description:** n/a

```cpp
soundPush[] = {"",0.1,1};
```

#### T

##### textureChecked

**Type:** String

**Description:** n/a

```cpp
textureChecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa";
```

##### textureDisabledChecked

**Type:** String

**Description:** n/a

```cpp
textureDisabledChecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa";
```

##### textureDisabledUnchecked

**Type:** String

**Description:** n/a

```cpp
textureDisabledUnchecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa";
```

##### textureFocusedChecked

**Type:** String

**Description:** n/a

```cpp
textureFocusedChecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa";
```

##### textureFocusedUnchecked

**Type:** String

**Description:** n/a

```cpp
textureFocusedUnchecked = "\a3\3DEN\Data\Displays\Display3DEN\ToolBar\widget_scaling_off_ca.paa";
```

##### textureHoverChecked

**Type:** String

**Description:** n/a

```cpp
textureHoverChecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa";
```

##### textureHoverUnchecked

**Type:** String

**Description:** n/a

```cpp
textureHoverUnchecked = "\a3\3DEN\Data\Displays\Display3DEN\ToolBar\widget_area_off_ca.paa";
```

##### texturePressedChecked

**Type:** String

**Description:** n/a

```cpp
texturePressedChecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa";
```

##### texturePressedUnchecked

**Type:** String

**Description:** n/a

```cpp
texturePressedUnchecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa";
```

##### textureUnchecked

**Type:** String

**Description:** n/a

```cpp
textureUnchecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa";
```

### Default Classes

> [!NOTE]
> **Arma 3:** **AddOns:** Classes need to be initialised first with `class SomeClass;`
>
> ---
>
> **Missions:** Since Arma 3 v2.02 one can use `import SomeClass;` to initialise a class (see the [import](../topics/import_~28Config~29.md) keyword).
>
> In older versions, use `"Default" call BIS_fnc_exportGUIBaseClasses;` and paste the result into the [description.ext](../topics/Description.ext.md).

#### RscCheckbox

```cpp
class RscCheckBox
{
    idc = -1;
    type = CT_CHECKBOX;
    deletable = 0;
    style = ST_LEFT;
    checked = 0;
    x = "0.375 * safezoneW + safezoneX";
    y = "0.36 * safezoneH + safezoneY";
    w = "0.025 * safezoneW";
    h = "0.04 * safezoneH";
    color[] = {1,1,1,0.7};
    colorFocused[] = {1,1,1,1};
    colorHover[] = {1,1,1,1};
    colorPressed[] = {1,1,1,1};
    colorDisabled[] = {1,1,1,0.2};
    colorBackground[] = {0,0,0,0};
    colorBackgroundFocused[] = {0,0,0,0};
    colorBackgroundHover[] = {0,0,0,0};
    colorBackgroundPressed[] = {0,0,0,0};
    colorBackgroundDisabled[] = {0,0,0,0};
    textureChecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa";
    textureUnchecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa";
    textureFocusedChecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa";
    textureFocusedUnchecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa";
    textureHoverChecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa";
    textureHoverUnchecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa";
    texturePressedChecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa";
    texturePressedUnchecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa";
    textureDisabledChecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa";
    textureDisabledUnchecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa";
    tooltipColorText[] = {1,1,1,1};
    tooltipColorBox[] = {1,1,1,1};
    tooltipColorShade[] = {0,0,0,0.65};
    soundEnter[] =
    {
        "",
        0.1,
        1
    };
    soundPush[] =
    {
        "",
        0.1,
        1
    };
    soundClick[] =
    {
        "",
        0.1,
        1
    };
    soundEscape[] =
    {
        "",
        0.1,
        1
    };
};
```

<sub>Source: [BI Community Wiki — CT CHECKBOX](https://community.bistudio.com/wiki/CT_CHECKBOX) (revision 342180).</sub>
