{"name":"CT COMBO","title":"CT COMBO","type":"topic","url":"https://community.bistudio.com/wiki/CT_COMBO","revid":351463,"updated":"2023-12-06T09:58:00Z","aliases":["DialogControls-Combo"],"markdown":"### Introduction\n\nA drop down menu. Compared to a CT_LISTBOX or CT_TOOLBOX 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.\n\n#### Related commands & functions\n\n- Commands: General\n- Commands: UI Eventhandlers\n- Commands: Listbox\n\n#### Related User Interface Eventhandlers\n\n- Events: General\n- Events: Listbox\n\n### Alphabetical Order\n\n> [!NOTE]\n> TokenNames common to most controls, such as x, y, w, h, text, idc... can be found **here**.\n\n> [!WARNING]\n> 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.\n\n```cpp\n#define CT_COMBO 4\n```\n\n#### A\n\n##### arrowEmpty\n\n**Type:** String\n\n**Description:** Texture of the collapsed control.\n\n```cpp\narrowEmpty = \"\\A3\\ui_f\\data\\GUI\\RscCommon\\rsccombo\\arrow_combo_ca.paa\";\n```\n\n##### arrowFull\n\n**Type:** String\n\n**Description:** Texture of the expanded control.\n\n```cpp\narrowFull = \"\\A3\\ui_f\\data\\GUI\\RscCommon\\rsccombo\\arrow_combo_active_ca.paa\";\n```\n\n#### C\n\n##### colorActive\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorActive[] = {1,0,0,1};\n```\n\n##### colorPicture\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPicture[] = {1,1,1,1};\n```\n\n##### colorPictureDisabled\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPictureDisabled[] = {1,1,1,0.25};\n```\n\n##### colorPictureRight\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPictureRight[] = {1,1,1,1};\n```\n\n##### colorPictureRightDisabled\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPictureRightDisabled[] = {1,1,1,0.25};\n```\n\n##### colorPictureRightSelected\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPictureRightSelected[] = {1,1,1,1};\n```\n\n##### colorPictureSelect\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPictureSelect[] = {1,1,1,1};\n```\n\n##### colorPictureSelected\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPictureSelected[] = {1,1,1,1};\n```\n\n##### colorScrollbar\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorScrollbar[] = {1,0,0,1};\n```\n\n##### colorSelect\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorSelect[] = {0,0,0,1};\n```\n\n##### colorSelect2Right\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorSelect2Right[] = {0,0,0,1};\n```\n\n##### colorSelectBackground\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorSelectBackground[] = {1,1,1,0.7};\n```\n\n##### colorSelectRight\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorSelectRight[] = {0,0,0,1};\n```\n\n##### colorTextRight\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorTextRight[] = {1,1,1,1};\n```\n\n##### ComboScrollBar\n\n**Type:** Class\n\n**Description:** The scrollbar that is visible when there are more elements than wholeHeight can display.\n\n```cpp\nclass ComboScrollBar\n{\n    color[] = {1,1,1,1};\n    colorActive[] = {1,1,1,1};\n    colorDisabled[] = {1,1,1,0.3};\n    thumb = \"\\A3\\ui_f\\data\\gui\\cfg\\scrollbar\\thumb_ca.paa\";\n    arrowEmpty = \"\\A3\\ui_f\\data\\gui\\cfg\\scrollbar\\arrowEmpty_ca.paa\";\n    arrowFull = \"\\A3\\ui_f\\data\\gui\\cfg\\scrollbar\\arrowFull_ca.paa\";\n    border = \"\\A3\\ui_f\\data\\gui\\cfg\\scrollbar\\border_ca.paa\";\n    shadow = 0;\n    scrollSpeed = 0.06;\n    width = 0;\n    height = 0;\n    autoScrollEnabled = 0;\n    autoScrollSpeed = -1;\n    autoScrollDelay = 5;\n    autoScrollRewind = 0;\n};\n```\n\n#### E\n\n##### ExtendedTooltip\n\n**Type:** Class\n\n**Description:** n/a\n\n```cpp\nclass ExtendedTooltip\n{\n    size = \"0.028 * SafezoneH\";\n    colorPremium[] = {1,0.502,0,1};\n    deletable = 0;\n    fade = 0;\n    access = 0;\n    type = 13;\n    idc = -1;\n    style = 0;\n    colorText[] = {1,1,1,1};\n    class Attributes\n    {\n        font = \"RobotoCondensed\";\n        color = \"#ffffff\";\n        colorLink = \"#D09B43\";\n        align = \"left\";\n        shadow = 1;\n    };\n    x = 0;\n    y = 0;\n    h = 0.035;\n    w = 0.1;\n    text = \"\";\n    shadow = 1;\n};\n```\n\n#### F\n\n##### from\n\n**Type:** Number\n\n**Description:** Probably used in conjunction with `to`\n\n```cpp\nfrom = 1982;\n```\n\n#### G\n\n##### gridType\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\ngridType = \"scaling\";\n```\n\n#### I\n\n##### Items\n\n**Type:** Class\n\n**Description:** List of entries.\n\n| Items |  |  |\n|---|---|---|\n| Name | Type | Remark |\n| **text** | String | Displayed text (equal to lbAdd) |\n| **value** | Number | Value of the entry (equal to lbSetValue) |\n| **data** | String | Data of the entry (equal to lbSetData) |\n| **picture** | String | Picture displayed on the left (equal to lbSetPicture) |\n| **pictureRight** | String | Picture displayed on the right (equal to lbSetPictureRight) |\n| **default** | Number | Sets this entry as the by default selected (equal to lbSetCurSel) |\n| **color** | Color (RGBA) | Text color of the entry (equal to lbSetColor) |\n| **tooltip** | String | Tooltip of the entry (equal to lbSetTooltip) |\n\n```cpp\nclass Items\n{\n    class Alphabet\n    {\n        text = \"Sort alphabetically\";\n        default = 1;\n    };\n    class Mod\n    {\n        text = \"Sort by mod\";\n    };\n};\n```\n\n#### M\n\n##### maxHistoryDelay\n\n**Type:** Number\n\n**Description:** n/a\n\n```cpp\nmaxHistoryDelay = 1;\n```\n\n#### R\n\n##### rows\n\n**Type:** Number\n\n**Description:** n/a\n\n```cpp\nrows = 2;\n```\n\n#### S\n\n##### soundCollapse\n\n**Type:** Array\n\n**Description:** Sound played when the combobox is collapsed.\n\n```cpp\nsoundCollapse[] = {\"\\A3\\ui_f\\data\\sound\\RscCombo\\soundCollapse\",0.1,1};\n```\n\n##### soundExpand\n\n**Type:** Array\n\n**Description:** Sound played when the combobox is expanded\n\n```cpp\nsoundExpand[] = {\"\\A3\\ui_f\\data\\sound\\RscCombo\\soundExpand\",0.1,1};\n```\n\n##### soundSelect\n\n**Type:** Array\n\n**Description:** Sound played when an item from the combobox is selected.\n\n```cpp\nsoundSelect[] = {\"\\A3\\ui_f\\data\\sound\\RscCombo\\soundSelect\",0.1,1};\n```\n\n#### T\n\n##### to\n\n**Type:** Number\n\n**Description:** Probably used in conjunction with `from`\n\n```cpp\nto = 2050;\n```\n\n#### W\n\n##### wholeHeight\n\n**Type:** Number, String\n\n**Description:** Limits the height of the expanded combobox.\n\nNumber example:\n\n```cpp\nwholeHeight = 0.45;\n```\n\nString example:\n\n```cpp\nwholeHeight = \"12 *     5 * (pixelH * pixelGrid *     0.50)\";\n```\n\n> [!NOTE]\n> **Arma 3:** **AddOns:** Classes need to be initialised first with `class SomeClass;`\n>\n> ---\n>\n> **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.\n\n#### RscCombo\n\n```cpp\nclass RscCombo\n{\n    deletable = 0;\n    fade = 0;\n    access = 0;\n    type = CT_COMBO;\n    colorSelect[] = {0,0,0,1};\n    colorText[] = {1,1,1,1};\n    colorBackground[] = {0,0,0,1};\n    colorScrollbar[] = {1,0,0,1};\n    colorDisabled[] = {1,1,1,0.25};\n    colorPicture[] = {1,1,1,1};\n    colorPictureSelected[] = {1,1,1,1};\n    colorPictureDisabled[] = {1,1,1,0.25};\n    colorPictureRight[] = {1,1,1,1};\n    colorPictureRightSelected[] = {1,1,1,1};\n    colorPictureRightDisabled[] = {1,1,1,0.25};\n    colorTextRight[] = {1,1,1,1};\n    colorSelectRight[] = {0,0,0,1};\n    colorSelect2Right[] = {0,0,0,1};\n    tooltipColorText[] = {1,1,1,1};\n    tooltipColorBox[] = {1,1,1,1};\n    tooltipColorShade[] = {0,0,0,0.65};\n    soundSelect[] =\n    {\n        \"\\A3\\ui_f\\data\\sound\\RscCombo\\soundSelect\",\n        0.1,\n        1\n    };\n    soundExpand[] =\n    {\n        \"\\A3\\ui_f\\data\\sound\\RscCombo\\soundExpand\",\n        0.1,\n        1\n    };\n    soundCollapse[] =\n    {\n        \"\\A3\\ui_f\\data\\sound\\RscCombo\\soundCollapse\",\n        0.1,\n        1\n    };\n    maxHistoryDelay = 1;\n    class ComboScrollBar : ScrollBar\n    {\n        color[] = {1,1,1,1};\n    };\n    style = ST_MULTI + ST_NO_RECT;\n    font = \"RobotoCondensed\";\n    sizeEx = GUI_TEXT_SIZE_MEDIUM;\n    shadow = 0;\n    x = 0;\n    y = 0;\n    w = 0.12;\n    h = 0.035;\n    colorSelectBackground[] = {1,1,1,0.7};\n    arrowEmpty = \"\\A3\\ui_f\\data\\GUI\\RscCommon\\rsccombo\\arrow_combo_ca.paa\";\n    arrowFull = \"\\A3\\ui_f\\data\\GUI\\RscCommon\\rsccombo\\arrow_combo_active_ca.paa\";\n    wholeHeight = 0.45;\n    colorActive[] = {1,0,0,1};\n};\n```","sections":[{"heading":"Introduction","level":3,"markdown":"A drop down menu. Compared to a CT_LISTBOX or CT_TOOLBOX 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."},{"heading":"Related commands & functions","level":4,"markdown":"- Commands: General\n- Commands: UI Eventhandlers\n- Commands: Listbox"},{"heading":"Related User Interface Eventhandlers","level":4,"markdown":"- Events: General\n- Events: Listbox"},{"heading":"Alphabetical Order","level":3,"markdown":"> [!NOTE]\n> TokenNames common to most controls, such as x, y, w, h, text, idc... can be found **here**.\n\n> [!WARNING]\n> 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.\n\n```cpp\n#define CT_COMBO 4\n```"},{"heading":"A","level":4,"markdown":""},{"heading":"arrowEmpty","level":5,"markdown":"**Type:** String\n\n**Description:** Texture of the collapsed control.\n\n```cpp\narrowEmpty = \"\\A3\\ui_f\\data\\GUI\\RscCommon\\rsccombo\\arrow_combo_ca.paa\";\n```"},{"heading":"arrowFull","level":5,"markdown":"**Type:** String\n\n**Description:** Texture of the expanded control.\n\n```cpp\narrowFull = \"\\A3\\ui_f\\data\\GUI\\RscCommon\\rsccombo\\arrow_combo_active_ca.paa\";\n```"},{"heading":"C","level":4,"markdown":""},{"heading":"colorActive","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorActive[] = {1,0,0,1};\n```"},{"heading":"colorPicture","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPicture[] = {1,1,1,1};\n```"},{"heading":"colorPictureDisabled","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPictureDisabled[] = {1,1,1,0.25};\n```"},{"heading":"colorPictureRight","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPictureRight[] = {1,1,1,1};\n```"},{"heading":"colorPictureRightDisabled","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPictureRightDisabled[] = {1,1,1,0.25};\n```"},{"heading":"colorPictureRightSelected","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPictureRightSelected[] = {1,1,1,1};\n```"},{"heading":"colorPictureSelect","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPictureSelect[] = {1,1,1,1};\n```"},{"heading":"colorPictureSelected","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPictureSelected[] = {1,1,1,1};\n```"},{"heading":"colorScrollbar","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorScrollbar[] = {1,0,0,1};\n```"},{"heading":"colorSelect","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorSelect[] = {0,0,0,1};\n```"},{"heading":"colorSelect2Right","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorSelect2Right[] = {0,0,0,1};\n```"},{"heading":"colorSelectBackground","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorSelectBackground[] = {1,1,1,0.7};\n```"},{"heading":"colorSelectRight","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorSelectRight[] = {0,0,0,1};\n```"},{"heading":"colorTextRight","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorTextRight[] = {1,1,1,1};\n```"},{"heading":"ComboScrollBar","level":5,"markdown":"**Type:** Class\n\n**Description:** The scrollbar that is visible when there are more elements than wholeHeight can display.\n\n```cpp\nclass ComboScrollBar\n{\n    color[] = {1,1,1,1};\n    colorActive[] = {1,1,1,1};\n    colorDisabled[] = {1,1,1,0.3};\n    thumb = \"\\A3\\ui_f\\data\\gui\\cfg\\scrollbar\\thumb_ca.paa\";\n    arrowEmpty = \"\\A3\\ui_f\\data\\gui\\cfg\\scrollbar\\arrowEmpty_ca.paa\";\n    arrowFull = \"\\A3\\ui_f\\data\\gui\\cfg\\scrollbar\\arrowFull_ca.paa\";\n    border = \"\\A3\\ui_f\\data\\gui\\cfg\\scrollbar\\border_ca.paa\";\n    shadow = 0;\n    scrollSpeed = 0.06;\n    width = 0;\n    height = 0;\n    autoScrollEnabled = 0;\n    autoScrollSpeed = -1;\n    autoScrollDelay = 5;\n    autoScrollRewind = 0;\n};\n```"},{"heading":"E","level":4,"markdown":""},{"heading":"ExtendedTooltip","level":5,"markdown":"**Type:** Class\n\n**Description:** n/a\n\n```cpp\nclass ExtendedTooltip\n{\n    size = \"0.028 * SafezoneH\";\n    colorPremium[] = {1,0.502,0,1};\n    deletable = 0;\n    fade = 0;\n    access = 0;\n    type = 13;\n    idc = -1;\n    style = 0;\n    colorText[] = {1,1,1,1};\n    class Attributes\n    {\n        font = \"RobotoCondensed\";\n        color = \"#ffffff\";\n        colorLink = \"#D09B43\";\n        align = \"left\";\n        shadow = 1;\n    };\n    x = 0;\n    y = 0;\n    h = 0.035;\n    w = 0.1;\n    text = \"\";\n    shadow = 1;\n};\n```"},{"heading":"F","level":4,"markdown":""},{"heading":"from","level":5,"markdown":"**Type:** Number\n\n**Description:** Probably used in conjunction with `to`\n\n```cpp\nfrom = 1982;\n```"},{"heading":"G","level":4,"markdown":""},{"heading":"gridType","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\ngridType = \"scaling\";\n```"},{"heading":"I","level":4,"markdown":""},{"heading":"Items","level":5,"markdown":"**Type:** Class\n\n**Description:** List of entries.\n\n| Items |  |  |\n|---|---|---|\n| Name | Type | Remark |\n| **text** | String | Displayed text (equal to lbAdd) |\n| **value** | Number | Value of the entry (equal to lbSetValue) |\n| **data** | String | Data of the entry (equal to lbSetData) |\n| **picture** | String | Picture displayed on the left (equal to lbSetPicture) |\n| **pictureRight** | String | Picture displayed on the right (equal to lbSetPictureRight) |\n| **default** | Number | Sets this entry as the by default selected (equal to lbSetCurSel) |\n| **color** | Color (RGBA) | Text color of the entry (equal to lbSetColor) |\n| **tooltip** | String | Tooltip of the entry (equal to lbSetTooltip) |\n\n```cpp\nclass Items\n{\n    class Alphabet\n    {\n        text = \"Sort alphabetically\";\n        default = 1;\n    };\n    class Mod\n    {\n        text = \"Sort by mod\";\n    };\n};\n```"},{"heading":"M","level":4,"markdown":""},{"heading":"maxHistoryDelay","level":5,"markdown":"**Type:** Number\n\n**Description:** n/a\n\n```cpp\nmaxHistoryDelay = 1;\n```"},{"heading":"R","level":4,"markdown":""},{"heading":"rows","level":5,"markdown":"**Type:** Number\n\n**Description:** n/a\n\n```cpp\nrows = 2;\n```"},{"heading":"S","level":4,"markdown":""},{"heading":"soundCollapse","level":5,"markdown":"**Type:** Array\n\n**Description:** Sound played when the combobox is collapsed.\n\n```cpp\nsoundCollapse[] = {\"\\A3\\ui_f\\data\\sound\\RscCombo\\soundCollapse\",0.1,1};\n```"},{"heading":"soundExpand","level":5,"markdown":"**Type:** Array\n\n**Description:** Sound played when the combobox is expanded\n\n```cpp\nsoundExpand[] = {\"\\A3\\ui_f\\data\\sound\\RscCombo\\soundExpand\",0.1,1};\n```"},{"heading":"soundSelect","level":5,"markdown":"**Type:** Array\n\n**Description:** Sound played when an item from the combobox is selected.\n\n```cpp\nsoundSelect[] = {\"\\A3\\ui_f\\data\\sound\\RscCombo\\soundSelect\",0.1,1};\n```"},{"heading":"T","level":4,"markdown":""},{"heading":"to","level":5,"markdown":"**Type:** Number\n\n**Description:** Probably used in conjunction with `from`\n\n```cpp\nto = 2050;\n```"},{"heading":"W","level":4,"markdown":""},{"heading":"wholeHeight","level":5,"markdown":"**Type:** Number, String\n\n**Description:** Limits the height of the expanded combobox.\n\nNumber example:\n\n```cpp\nwholeHeight = 0.45;\n```\n\nString example:\n\n```cpp\nwholeHeight = \"12 *     5 * (pixelH * pixelGrid *     0.50)\";\n```\n\n> [!NOTE]\n> **Arma 3:** **AddOns:** Classes need to be initialised first with `class SomeClass;`\n>\n> ---\n>\n> **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."},{"heading":"RscCombo","level":4,"markdown":"```cpp\nclass RscCombo\n{\n    deletable = 0;\n    fade = 0;\n    access = 0;\n    type = CT_COMBO;\n    colorSelect[] = {0,0,0,1};\n    colorText[] = {1,1,1,1};\n    colorBackground[] = {0,0,0,1};\n    colorScrollbar[] = {1,0,0,1};\n    colorDisabled[] = {1,1,1,0.25};\n    colorPicture[] = {1,1,1,1};\n    colorPictureSelected[] = {1,1,1,1};\n    colorPictureDisabled[] = {1,1,1,0.25};\n    colorPictureRight[] = {1,1,1,1};\n    colorPictureRightSelected[] = {1,1,1,1};\n    colorPictureRightDisabled[] = {1,1,1,0.25};\n    colorTextRight[] = {1,1,1,1};\n    colorSelectRight[] = {0,0,0,1};\n    colorSelect2Right[] = {0,0,0,1};\n    tooltipColorText[] = {1,1,1,1};\n    tooltipColorBox[] = {1,1,1,1};\n    tooltipColorShade[] = {0,0,0,0.65};\n    soundSelect[] =\n    {\n        \"\\A3\\ui_f\\data\\sound\\RscCombo\\soundSelect\",\n        0.1,\n        1\n    };\n    soundExpand[] =\n    {\n        \"\\A3\\ui_f\\data\\sound\\RscCombo\\soundExpand\",\n        0.1,\n        1\n    };\n    soundCollapse[] =\n    {\n        \"\\A3\\ui_f\\data\\sound\\RscCombo\\soundCollapse\",\n        0.1,\n        1\n    };\n    maxHistoryDelay = 1;\n    class ComboScrollBar : ScrollBar\n    {\n        color[] = {1,1,1,1};\n    };\n    style = ST_MULTI + ST_NO_RECT;\n    font = \"RobotoCondensed\";\n    sizeEx = GUI_TEXT_SIZE_MEDIUM;\n    shadow = 0;\n    x = 0;\n    y = 0;\n    w = 0.12;\n    h = 0.035;\n    colorSelectBackground[] = {1,1,1,0.7};\n    arrowEmpty = \"\\A3\\ui_f\\data\\GUI\\RscCommon\\rsccombo\\arrow_combo_ca.paa\";\n    arrowFull = \"\\A3\\ui_f\\data\\GUI\\RscCommon\\rsccombo\\arrow_combo_active_ca.paa\";\n    wholeHeight = 0.45;\n    colorActive[] = {1,0,0,1};\n};\n```"}],"categories":["Control Types"],"groups":["GUI"]}