---
name: "CT COMBO"
type: topic
aliases: ["DialogControls-Combo"]
source: https://community.bistudio.com/wiki/CT_COMBO
revid: 351463
updated: 2023-12-06T09:58:00Z
---

# CT COMBO

### Introduction

A drop down menu. Compared to a [CT_LISTBOX](../topics/CT_LISTBOX.md) or [CT_TOOLBOX](../topics/CT_TOOLBOX.md) it can display many items without taking a lot of space. Disadvantage is that the user has to interact first with the control so see multiple entries.

#### Related commands & functions

- Commands: General
- Commands: UI Eventhandlers
- Commands: Listbox

#### Related User Interface Eventhandlers

- [Events: General](../topics/User_Interface_Event_Handlers.md#generic-events)
- [Events: Listbox](../topics/User_Interface_Event_Handlers.md#listbox-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_COMBO 4
```

#### A

##### arrowEmpty

**Type:** String

**Description:** Texture of the collapsed control.

```cpp
arrowEmpty = "\A3\ui_f\data\GUI\RscCommon\rsccombo\arrow_combo_ca.paa";
```

##### arrowFull

**Type:** String

**Description:** Texture of the expanded control.

```cpp
arrowFull = "\A3\ui_f\data\GUI\RscCommon\rsccombo\arrow_combo_active_ca.paa";
```

#### C

##### colorActive

**Type:** Array

**Description:** n/a

```cpp
colorActive[] = {1,0,0,1};
```

##### colorPicture

**Type:** Array

**Description:** n/a

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

##### colorPictureDisabled

**Type:** Array

**Description:** n/a

```cpp
colorPictureDisabled[] = {1,1,1,0.25};
```

##### colorPictureRight

**Type:** Array

**Description:** n/a

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

##### colorPictureRightDisabled

**Type:** Array

**Description:** n/a

```cpp
colorPictureRightDisabled[] = {1,1,1,0.25};
```

##### colorPictureRightSelected

**Type:** Array

**Description:** n/a

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

##### colorPictureSelect

**Type:** Array

**Description:** n/a

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

##### colorPictureSelected

**Type:** Array

**Description:** n/a

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

##### colorScrollbar

**Type:** Array

**Description:** n/a

```cpp
colorScrollbar[] = {1,0,0,1};
```

##### colorSelect

**Type:** Array

**Description:** n/a

```cpp
colorSelect[] = {0,0,0,1};
```

##### colorSelect2Right

**Type:** Array

**Description:** n/a

```cpp
colorSelect2Right[] = {0,0,0,1};
```

##### colorSelectBackground

**Type:** Array

**Description:** n/a

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

##### colorSelectRight

**Type:** Array

**Description:** n/a

```cpp
colorSelectRight[] = {0,0,0,1};
```

##### colorTextRight

**Type:** Array

**Description:** n/a

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

##### ComboScrollBar

**Type:** Class

**Description:** The scrollbar that is visible when there are more elements than wholeHeight can display.

```cpp
class ComboScrollBar
{
    color[] = {1,1,1,1};
    colorActive[] = {1,1,1,1};
    colorDisabled[] = {1,1,1,0.3};
    thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
    arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
    arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
    border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
    shadow = 0;
    scrollSpeed = 0.06;
    width = 0;
    height = 0;
    autoScrollEnabled = 0;
    autoScrollSpeed = -1;
    autoScrollDelay = 5;
    autoScrollRewind = 0;
};
```

#### E

##### ExtendedTooltip

**Type:** Class

**Description:** n/a

```cpp
class ExtendedTooltip
{
    size = "0.028 * SafezoneH";
    colorPremium[] = {1,0.502,0,1};
    deletable = 0;
    fade = 0;
    access = 0;
    type = 13;
    idc = -1;
    style = 0;
    colorText[] = {1,1,1,1};
    class Attributes
    {
        font = "RobotoCondensed";
        color = "#ffffff";
        colorLink = "#D09B43";
        align = "left";
        shadow = 1;
    };
    x = 0;
    y = 0;
    h = 0.035;
    w = 0.1;
    text = "";
    shadow = 1;
};
```

#### F

##### from

**Type:** Number

**Description:** Probably used in conjunction with `to`

```cpp
from = 1982;
```

#### G

##### gridType

**Type:** String

**Description:** n/a

```cpp
gridType = "scaling";
```

#### I

##### Items

**Type:** Class

**Description:** List of entries.

| Items |  |  |
|---|---|---|
| Name | Type | Remark |
| **text** | [String](../topics/String.md) | Displayed text (equal to [lbAdd](../commands/lbAdd.md)) |
| **value** | [Number](../topics/Number.md) | Value of the entry (equal to [lbSetValue](../commands/lbSetValue.md)) |
| **data** | [String](../topics/String.md) | Data of the entry (equal to [lbSetData](../commands/lbSetData.md)) |
| **picture** | [String](../topics/String.md) | Picture displayed on the left (equal to [lbSetPicture](../commands/lbSetPicture.md)) |
| **pictureRight** | [String](../topics/String.md) | Picture displayed on the right (equal to [lbSetPictureRight](../commands/lbSetPictureRight.md)) |
| **default** | [Number](../topics/Number.md) | Sets this entry as the by default selected (equal to [lbSetCurSel](../commands/lbSetCurSel.md)) |
| **color** | [Color (RGBA)](../topics/Color.md) | Text color of the entry (equal to [lbSetColor](../commands/lbSetColor.md)) |
| **tooltip** | [String](../topics/String.md) | Tooltip of the entry (equal to [lbSetTooltip](../commands/lbSetTooltip.md)) |

```cpp
class Items
{
    class Alphabet
    {
        text = "Sort alphabetically";
        default = 1;
    };
    class Mod
    {
        text = "Sort by mod";
    };
};
```

#### M

##### maxHistoryDelay

**Type:** Number

**Description:** n/a

```cpp
maxHistoryDelay = 1;
```

#### R

##### rows

**Type:** Number

**Description:** n/a

```cpp
rows = 2;
```

#### S

##### soundCollapse

**Type:** Array

**Description:** Sound played when the combobox is collapsed.

```cpp
soundCollapse[] = {"\A3\ui_f\data\sound\RscCombo\soundCollapse",0.1,1};
```

##### soundExpand

**Type:** Array

**Description:** Sound played when the combobox is expanded

```cpp
soundExpand[] = {"\A3\ui_f\data\sound\RscCombo\soundExpand",0.1,1};
```

##### soundSelect

**Type:** Array

**Description:** Sound played when an item from the combobox is selected.

```cpp
soundSelect[] = {"\A3\ui_f\data\sound\RscCombo\soundSelect",0.1,1};
```

#### T

##### to

**Type:** Number

**Description:** Probably used in conjunction with `from`

```cpp
to = 2050;
```

#### W

##### wholeHeight

**Type:** Number, String

**Description:** Limits the height of the expanded combobox.

Number example:

```cpp
wholeHeight = 0.45;
```

String example:

```cpp
wholeHeight = "12 *     5 * (pixelH * pixelGrid *     0.50)";
```

> [!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. In older versions, use `"Default" call BIS_fnc_exportGUIBaseClasses;` and paste the result into [description.ext](../topics/Description.ext.md).

#### RscCombo

```cpp
class RscCombo
{
    deletable = 0;
    fade = 0;
    access = 0;
    type = CT_COMBO;
    colorSelect[] = {0,0,0,1};
    colorText[] = {1,1,1,1};
    colorBackground[] = {0,0,0,1};
    colorScrollbar[] = {1,0,0,1};
    colorDisabled[] = {1,1,1,0.25};
    colorPicture[] = {1,1,1,1};
    colorPictureSelected[] = {1,1,1,1};
    colorPictureDisabled[] = {1,1,1,0.25};
    colorPictureRight[] = {1,1,1,1};
    colorPictureRightSelected[] = {1,1,1,1};
    colorPictureRightDisabled[] = {1,1,1,0.25};
    colorTextRight[] = {1,1,1,1};
    colorSelectRight[] = {0,0,0,1};
    colorSelect2Right[] = {0,0,0,1};
    tooltipColorText[] = {1,1,1,1};
    tooltipColorBox[] = {1,1,1,1};
    tooltipColorShade[] = {0,0,0,0.65};
    soundSelect[] =
    {
        "\A3\ui_f\data\sound\RscCombo\soundSelect",
        0.1,
        1
    };
    soundExpand[] =
    {
        "\A3\ui_f\data\sound\RscCombo\soundExpand",
        0.1,
        1
    };
    soundCollapse[] =
    {
        "\A3\ui_f\data\sound\RscCombo\soundCollapse",
        0.1,
        1
    };
    maxHistoryDelay = 1;
    class ComboScrollBar : ScrollBar
    {
        color[] = {1,1,1,1};
    };
    style = ST_MULTI + ST_NO_RECT;
    font = "RobotoCondensed";
    sizeEx = GUI_TEXT_SIZE_MEDIUM;
    shadow = 0;
    x = 0;
    y = 0;
    w = 0.12;
    h = 0.035;
    colorSelectBackground[] = {1,1,1,0.7};
    arrowEmpty = "\A3\ui_f\data\GUI\RscCommon\rsccombo\arrow_combo_ca.paa";
    arrowFull = "\A3\ui_f\data\GUI\RscCommon\rsccombo\arrow_combo_active_ca.paa";
    wholeHeight = 0.45;
    colorActive[] = {1,0,0,1};
};
```

<sub>Source: [BI Community Wiki — CT COMBO](https://community.bistudio.com/wiki/CT_COMBO) (revision 351463).</sub>
