{"name":"CT LISTBOX","title":"CT LISTBOX","type":"topic","url":"https://community.bistudio.com/wiki/CT_LISTBOX","revid":352975,"updated":"2024-03-08T10:39:44Z","aliases":[],"markdown":"### Introduction\n\nThe listbox displays a list of items. With ST_MULTI it is possible to select multiple entries. For listBoxes, the usage of 'ST_' style constants (ST_MULTI & ST_TITLE_BAR) behave differently than expected for other controls, so use the corresponding 'LB_' (LB_TEXTURES & LB_MULTI) list box style variants instead.\n\n```cpp\nstyle = LB_TEXTURES; // solid scrollbar\nstyle = LB_MULTI; // multiple item selection\n```\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_LISTBOX 5\n```\n\n#### A\n\n##### active\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nactive = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaysinglemission\\done_ca.paa\";\n```\n\n##### addons\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\naddons = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\sessions_addons_ca.paa\";\n```\n\n##### allowedFilePatching\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nallowedFilePatching = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\sessions_version_ca.paa\";\n```\n\n##### arrowEmpty\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\narrowEmpty = \"#(argb,8,8,3)color(1,1,1,1)\";\n```\n\n##### arrowFull\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\narrowFull = \"#(argb,8,8,3)color(1,1,1,1)\";\n```\n\n##### autoScrollDelay\n\n**Type:** Number\n\n**Description:** n/a\n\n```cpp\nautoScrollDelay = 5;\n```\n\n##### autoScrollRewind\n\n**Type:** Number\n\n**Description:** n/a\n\n```cpp\nautoScrollRewind = 0;\n```\n\n##### autoScrollSpeed\n\n**Type:** Number\n\n**Description:** n/a\n\n```cpp\nautoScrollSpeed = -1;\n```\n\n#### C\n\n##### canDrag\n\n**Type:** Number\n\n**Description:** Allow dragging and dropping listbox items similar to how the inventory works.\n\n```cpp\ncanDrag = 0;\n```\n\n##### collisionColor\n\n**Type:** Array\n\n**Description:** Color of the collision key binding; default {1,0,0,1} - Only relevant to config keys dialog (type = 5; idc = 102)\n\n```cpp\ncollisionColor[] = {\"(profilenamespace getvariable ['IGUI_ERROR_RGB_R',0.8])\",\"(profilenamespace getvariable ['IGUI_ERROR_RGB_G',0.0])\",\"(profilenamespace getvariable ['IGUI_ERROR_RGB_B',0.0])\",1};\n```\n\n##### collisionColorFirstKey\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncollisionColorFirstKey[] = {\"(profilenamespace getvariable ['IGUI_WARNING_RGB_R',0.8])\",\"(profilenamespace getvariable ['IGUI_WARNING_RGB_G',0.5])\",\"(profilenamespace getvariable ['IGUI_WARNING_RGB_B',0.0])\",1};\n```\n\n##### color\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolor[] = {0.95,0.95,0.95,1};\n```\n\n##### colorAI\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorAI[] = {1,0,0,1};\n```\n\n##### colorNobody\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorNobody[] = {1,1,1,0.25};\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##### colorPictureSelected\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPictureSelected[] = {1,1,1,1};\n```\n\n##### colorPingBad\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPingBad[] = {1,0,0,1};\n```\n\n##### colorPingGood\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPingGood[] = {0,1,0,1};\n```\n\n##### colorPingPoor\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPingPoor[] = {1,0.6,0,1};\n```\n\n##### colorPingUnknown\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPingUnknown[] = {0.4,0.4,0.4,1};\n```\n\n##### colorPlayer\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPlayer[] = {1,1,0,1};\n```\n\n##### colorScrollbar\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorScrollbar[] = {1,0,0,0};\n```\n\n##### colorSelect\n\n**Type:** Array\n\n**Description:** Text color of a selected item.\n\n```cpp\ncolorSelect[] = {1,1,1,1};\n```\n\n##### colorSelect2\n\n**Type:** Array\n\n**Description:** Text color to pulsate to from `colorSelect`.\n\n```cpp\ncolorSelect2[] = {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:** Background color of a selected entry.\n\n```cpp\ncolorSelectBackground[] = {0.95,0.95,0.95,1};\n```\n\n##### colorSelectBackground2\n\n**Type:** Array\n\n**Description:** Background color to pulsate to from `colorSelectBackground` of a selected entry.\n\n```cpp\ncolorSelectBackground2[] = {1,1,1,0.5};\n```\n\n##### colorSelectRight\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorSelectRight[] = {0,0,0,1};\n```\n\n##### colorShadow\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorShadow[] = {0,0,0,0.5};\n```\n\n##### colorTextRight\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorTextRight[] = {1,1,1,1};\n```\n\n##### columns\n\n**Type:** Number, Class\n\n**Description:** n/a\n\nNumber example:\n\n```cpp\ncolumns = 1;\n```\n\nClass example:\n\n```cpp\nclass Columns\n{\n    class ColumnFavorite\n    {\n        x = \"1.2 * (((safezoneW / safezoneH) min 1.2) / 40) + (SafezoneX)\";\n        w = \"(2 * (((safezoneW / safezoneH) min 1.2) / 40))\";\n    };\n    class ColumnServer\n    {\n        x = \"2.7 * (((safezoneW / safezoneH) min 1.2) / 40) + (SafezoneX)\";\n        w = \"(11 * (((safezoneW / safezoneH) min 1.2) / 40)) + 0.45*(safezoneW - ((safezoneW / safezoneH) min 1.2))\";\n    };\n    class ColumnType\n    {\n        x = \"safezoneX + (15 * (((safezoneW / safezoneH) min 1.2) / 40)) + 0.45*(safezoneW - ((safezoneW / safezoneH) min 1.2))\";\n        w = \"3 * (((safezoneW / safezoneH) min 1.2) / 40)\";\n    };\n    class ColumnMission\n    {\n        x = \"safezoneX + (18.3 * (((safezoneW / safezoneH) min 1.2) / 40)) + 0.45*(safezoneW - ((safezoneW / safezoneH) min 1.2))\";\n        w = \"(10.5 * (((safezoneW / safezoneH) min 1.2) / 40)) + 0.45*(safezoneW - ((safezoneW / safezoneH) min 1.2))\";\n    };\n    class ColumnState\n    {\n        x = \"safezoneX + (29.1 * (((safezoneW / safezoneH) min 1.2) / 40)) + 0.9*(safezoneW - ((safezoneW / safezoneH) min 1.2))\";\n        w = \"3 * (((safezoneW / safezoneH) min 1.2) / 40)\";\n    };\n    class ColumnPlayers\n    {\n        x = \"safezoneX + (32.4 * (((safezoneW / safezoneH) min 1.2) / 40)) + 0.9*(safezoneW - ((safezoneW / safezoneH) min 1.2))\";\n        w = \"3 * (((safezoneW / safezoneH) min 1.2) / 40)\";\n    };\n    class ColumnPing\n    {\n        x = \"safezoneX + (35.7 * (((safezoneW / safezoneH) min 1.2) / 40)) + 0.9*(safezoneW - ((safezoneW / safezoneH) min 1.2))\";\n        w = \"3 * (((safezoneW / safezoneH) min 1.2) / 40)\";\n    };\n};\n```\n\n#### D\n\n##### disabled\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\ndisabled = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaysinglemission\\none_ca.paa\";\n```\n\n##### disabledAI\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\ndisabledAI = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayersetup\\disabledai_ca.paa\";\n```\n\n##### disabledCtrlColor\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\ndisabledCtrlColor[] = {1,1,1,0.5};\n```\n\n##### disabledKeyColor\n\n**Type:** Array\n\n**Description:** Color of the disabled key binding; default {0.3,0.3,0.3,1} - Only relevant to config keys dialog (type = 5; idc = 102)\n\n```cpp\ndisabledKeyColor[] = {0.4,0.4,0.4,1};\n```\n\n##### DLCTemplate\n\n**Type:** Class\n\n**Description:** n/a\n\n```cpp\nclass DLCTemplate\n{\n    class controls\n    {\n        class DlcBg\n        {\n            idc = 101;\n            text = \"\\A3\\Ui_f\\data\\GUI\\Rsc\\RscDisplayInventory\\InventoryStripe_ca.paa\";\n            color[] = {1,1,1,1};\n            x = 0;\n            y = 0;\n            w = \"1.8 * (((safezoneW / safezoneH) min 1.2) / 40)\";\n            h = \"1.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)\";\n        };\n        class DlcIcon\n        {\n            idc = 100;\n            text = \"\";\n            color[] = {1,1,1,1};\n            x = \"0 * (((safezoneW / safezoneH) min 1.2) / 40)\";\n            y = \"0 * (((safezoneW / safezoneH) min 1.2) / 40)\";\n            w = \"1 * (((safezoneW / safezoneH) min 1.2) / 40)\";\n            h = \"1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)\";\n        };\n    };\n};\n```\n\n#### E\n\n##### enabled\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nenabled = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaysinglemission\\done_ca.paa\";\n```\n\n##### enabledAI\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nenabledAI = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayersetup\\enabledai_ca.paa\";\n```\n\n#### I\n\n##### idcx\n\n**Type:** Number\n\n**Description:** Used in the Arsenal display for unknown reason.\n\n```cpp\nidcx = 974;\n```\n\n##### itemBackground\n\n**Type:** Array\n\n**Description:** n/a\n\n```cpp\nitemBackground[] = {1,1,1,0.1};\n```\n\n##### Items\n\n**Type:** Class\n\n**Description:** Default entries for the listbox columns.\n\n```cpp\n// Yes, this is a vanilla config :D\nclass Items\n{\n    class Item0\n    {\n        text = \"LOL\";\n        textRight = \"ROFL\";\n        tooltip = \"OMG\";\n        picture = \"\\a3\\Ui_f\\data\\Map\\Markers\\Military\\warning_CA.paa\";\n        pictureRight = \"\\a3\\Ui_f\\data\\Map\\Markers\\Military\\unknown_CA.paa\";\n        color[] = {1,0,1,1};\n        colorRight[] = {1,1,0,1};\n        colorPicture[] = {0,1,1,1};\n        colorPictureSelected[] = {1,0,0,1};\n        colorPictureDisabled[] = {0,0,0,1};\n        colorPictureRight[] = {0,1,0,1};\n        colorPictureRightSelected[] = {0,0,1,1};\n        colorPictureRightDisabled[] = {0,0,0,1};\n        data = \"WTF\";\n        value = 42;\n        default = 0;\n    };\n    class AnotherItem\n    {\n        text = \"O RLY\";\n        default = 1;\n    };\n};\n```\n\n##### itemSpacing\n\n**Type:** Number\n\n**Description:** n/a\n\n```cpp\nitemSpacing = 0;\n```\n\n#### L\n\n##### ListScrollBar\n\n**Type:** Class\n\n**Description:** Prior to Arma 3 use ScrollBar. Scrollbars might not show if h and w properties of the ListBox are not 0. see also DialogControls-Sliders\n\n```cpp\nclass ListScrollBar\n{\n    color[] = {1,1,1,1};\n    autoScrollEnabled = 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    autoScrollSpeed = -1;\n    autoScrollDelay = 5;\n    autoScrollRewind = 0;\n};\n```\n\n##### locked\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nlocked = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\sessions_locked_ca.paa\";\n```\n\n#### M\n\n##### mainCollumW\n\n**Type:** Number\n\n**Description:** Width of the left column 0..1; default 0.4 - Only relevant to config keys dialog (type = 5; idc = 102)\n\n```cpp\nmainCollumW = 0.4;\n```\n\n##### maxHistoryDelay\n\n**Type:** Number\n\n**Description:** n/a\n\n```cpp\nmaxHistoryDelay = 1;\n```\n\n##### mods\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nmods = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\sessions_mods_ca.paa\";\n```\n\n#### N\n\n##### none\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nnone = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\sessions_none_ca.paa\";\n```\n\n#### P\n\n##### password\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\npassword = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\sessions_password_ca.paa\";\n```\n\n##### period\n\n**Type:** Number\n\n**Description:** Controls how fast the color changes from colorXXX to colorXXX2.\n\n```cpp\nperiod = 1.2;\n```\n\n#### R\n\n##### rowHeight\n\n**Type:** Number, String\n\n**Description:** The height of a single row.\n\nNumber example:\n\n```cpp\nrowHeight = 0;\n```\n\nString example:\n\n```cpp\nrowHeight = \"1.75 * (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)\";\n```\n\n##### rows\n\n**Type:** Number\n\n**Description:** n/a\n\n```cpp\nrows = 8;\n```\n\n#### S\n\n##### secndCollumW\n\n**Type:** Number\n\n**Description:** Width of the right column 0..1; default 0.6 - Only relevant to config keys dialog (type = 5; idc = 102)\n\n```cpp\nsecndCollumW = 0.6;\n```\n\n##### serverDislike\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nserverDislike = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\mp_serverdislike_ca.paa\";\n```\n\n##### serverEmpty\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nserverEmpty = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\mp_serverempty_ca.paa\";\n```\n\n##### serverLike\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nserverLike = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\mp_serverlike_ca.paa\";\n```\n\n##### sizeEx2\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nsizeEx2 = \"0.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)\";\n```\n\n##### soundSelect\n\n**Type:** Array\n\n**Description:** Sound played when an entry is selected.\n\n```cpp\nsoundSelect[] = {\"\\A3\\ui_f\\data\\sound\\RscListbox\\soundSelect\",0.09,1};\n```\n\n##### star\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nstar = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\sessions_star_ca.paa\";\n```\n\n#### V\n\n##### version\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nversion = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\sessions_version_ca.paa\";\n```\n\n#### W\n\n##### wholeHeight\n\n**Type:** Number\n\n**Description:** n/a\n\n```cpp\nwholeHeight = 0.21;\n```\n\n### Default Classes\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 (see the import keyword).\n>\n> In older versions, use `\"Default\" call BIS_fnc_exportGUIBaseClasses;` and paste the result into the description.ext.\n\n#### RscListBox\n\n```cpp\nclass RscListBox\n{\n    deletable = 0;\n    fade = 0;\n    access = 0;\n    type = CT_LISTBOX;\n    rowHeight = 0;\n    colorText[] = {1,1,1,1};\n    colorDisabled[] = {1,1,1,0.25};\n    colorScrollbar[] = {1,0,0,0};\n    colorSelect[] = {0,0,0,1};\n    colorSelect2[] = {0,0,0,1};\n    colorSelectBackground[] = {0.95,0.95,0.95,1};\n    colorSelectBackground2[] = {1,1,1,0.5};\n    colorBackground[] = {0,0,0,0.3};\n    soundSelect[] =\n    {\n        \"\\A3\\ui_f\\data\\sound\\RscListbox\\soundSelect\",\n        0.09,\n        1\n    };\n    autoScrollSpeed = -1;\n    autoScrollDelay = 5;\n    autoScrollRewind = 0;\n    arrowEmpty = \"#(argb,8,8,3)color(1,1,1,1)\";\n    arrowFull = \"#(argb,8,8,3)color(1,1,1,1)\";\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    class ListScrollBar : ScrollBar\n    {\n        color[] = {1,1,1,1};\n        autoScrollEnabled = 1;\n    };\n    x = 0;\n    y = 0;\n    w = 0.3;\n    h = 0.3;\n    style = LB_TEXTURES;\n    font = \"RobotoCondensed\";\n    sizeEx = GUI_TEXT_SIZE_MEDIUM;\n    shadow = 0;\n    colorShadow[] = {0,0,0,0.5};\n    period = 1.2;\n    maxHistoryDelay = 1;\n};\n```\n\n#### Scripting Example\n\n| Code | Picture |\n|---|---|\n| ```sqf<br>{<br>    private _ctrl = _x;<br>    {<br>        _ctrl lbAdd getText (_x >> \"displayName\");<br>        _ctrl lbSetPicture [_foreachindex,getText (_x >> \"texture\")];<br>        _ctrl lbSetTooltip [_foreachindex,getText (_x >> \"displayName\")];<br>    } forEach (\"true\" configClasses (configFile >> \"CfgRanks\"));<br>    _ctrl lbSetCurSel 0;<br>``` |  |\n| ```sqf<br>    private _current = lbCurSel _ctrl;<br>    _ctrl lbSetData [_current,\"hi\"];<br>    private _data = _ctrl lbData _current;<br>    private _pic = _ctrl lbPicture _current;<br>    _ctrl lbSetValue [_current, 1];<br>    private _value = _ctrl lbValue _current;<br>    private _size = lbSize _ctrl;<br>    private _color = _ctrl lbColor _current;<br>    _ctrl lbSetColor [_current, [(_color select 0) / 2, (_color select 1) / 4, 0, 1]];<br>``` |  |\n| ```sqf<br>    lbSort [_ctrl, \"DESC\"];<br>    lbSortByValue _ctrl;<br>``` |  |\n| ```sqf<br>    if (_ctrl lbIsSelected _current) then<br>    {<br>        _ctrl lbDelete _current;<br>        lbClear _ctrl;<br>    };<br>} forEach [_CT_COMBO, _CT_LISTBOX, _CT_XLISTBOX, _CT_XCOMBO];<br>``` |  |\n\nCT_LISTBOX command family can be used with CT_COMBO, CT_LISTBOX, CT_XLISTBOX and CT_XCOMBO.","sections":[{"heading":"Introduction","level":3,"markdown":"The listbox displays a list of items. With ST_MULTI it is possible to select multiple entries. For listBoxes, the usage of 'ST_' style constants (ST_MULTI & ST_TITLE_BAR) behave differently than expected for other controls, so use the corresponding 'LB_' (LB_TEXTURES & LB_MULTI) list box style variants instead.\n\n```cpp\nstyle = LB_TEXTURES; // solid scrollbar\nstyle = LB_MULTI; // multiple item selection\n```"},{"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_LISTBOX 5\n```"},{"heading":"A","level":4,"markdown":""},{"heading":"active","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nactive = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaysinglemission\\done_ca.paa\";\n```"},{"heading":"addons","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\naddons = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\sessions_addons_ca.paa\";\n```"},{"heading":"allowedFilePatching","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nallowedFilePatching = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\sessions_version_ca.paa\";\n```"},{"heading":"arrowEmpty","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\narrowEmpty = \"#(argb,8,8,3)color(1,1,1,1)\";\n```"},{"heading":"arrowFull","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\narrowFull = \"#(argb,8,8,3)color(1,1,1,1)\";\n```"},{"heading":"autoScrollDelay","level":5,"markdown":"**Type:** Number\n\n**Description:** n/a\n\n```cpp\nautoScrollDelay = 5;\n```"},{"heading":"autoScrollRewind","level":5,"markdown":"**Type:** Number\n\n**Description:** n/a\n\n```cpp\nautoScrollRewind = 0;\n```"},{"heading":"autoScrollSpeed","level":5,"markdown":"**Type:** Number\n\n**Description:** n/a\n\n```cpp\nautoScrollSpeed = -1;\n```"},{"heading":"C","level":4,"markdown":""},{"heading":"canDrag","level":5,"markdown":"**Type:** Number\n\n**Description:** Allow dragging and dropping listbox items similar to how the inventory works.\n\n```cpp\ncanDrag = 0;\n```"},{"heading":"collisionColor","level":5,"markdown":"**Type:** Array\n\n**Description:** Color of the collision key binding; default {1,0,0,1} - Only relevant to config keys dialog (type = 5; idc = 102)\n\n```cpp\ncollisionColor[] = {\"(profilenamespace getvariable ['IGUI_ERROR_RGB_R',0.8])\",\"(profilenamespace getvariable ['IGUI_ERROR_RGB_G',0.0])\",\"(profilenamespace getvariable ['IGUI_ERROR_RGB_B',0.0])\",1};\n```"},{"heading":"collisionColorFirstKey","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncollisionColorFirstKey[] = {\"(profilenamespace getvariable ['IGUI_WARNING_RGB_R',0.8])\",\"(profilenamespace getvariable ['IGUI_WARNING_RGB_G',0.5])\",\"(profilenamespace getvariable ['IGUI_WARNING_RGB_B',0.0])\",1};\n```"},{"heading":"color","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolor[] = {0.95,0.95,0.95,1};\n```"},{"heading":"colorAI","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorAI[] = {1,0,0,1};\n```"},{"heading":"colorNobody","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorNobody[] = {1,1,1,0.25};\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":"colorPictureSelected","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPictureSelected[] = {1,1,1,1};\n```"},{"heading":"colorPingBad","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPingBad[] = {1,0,0,1};\n```"},{"heading":"colorPingGood","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPingGood[] = {0,1,0,1};\n```"},{"heading":"colorPingPoor","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPingPoor[] = {1,0.6,0,1};\n```"},{"heading":"colorPingUnknown","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPingUnknown[] = {0.4,0.4,0.4,1};\n```"},{"heading":"colorPlayer","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorPlayer[] = {1,1,0,1};\n```"},{"heading":"colorScrollbar","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorScrollbar[] = {1,0,0,0};\n```"},{"heading":"colorSelect","level":5,"markdown":"**Type:** Array\n\n**Description:** Text color of a selected item.\n\n```cpp\ncolorSelect[] = {1,1,1,1};\n```"},{"heading":"colorSelect2","level":5,"markdown":"**Type:** Array\n\n**Description:** Text color to pulsate to from `colorSelect`.\n\n```cpp\ncolorSelect2[] = {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:** Background color of a selected entry.\n\n```cpp\ncolorSelectBackground[] = {0.95,0.95,0.95,1};\n```"},{"heading":"colorSelectBackground2","level":5,"markdown":"**Type:** Array\n\n**Description:** Background color to pulsate to from `colorSelectBackground` of a selected entry.\n\n```cpp\ncolorSelectBackground2[] = {1,1,1,0.5};\n```"},{"heading":"colorSelectRight","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorSelectRight[] = {0,0,0,1};\n```"},{"heading":"colorShadow","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorShadow[] = {0,0,0,0.5};\n```"},{"heading":"colorTextRight","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ncolorTextRight[] = {1,1,1,1};\n```"},{"heading":"columns","level":5,"markdown":"**Type:** Number, Class\n\n**Description:** n/a\n\nNumber example:\n\n```cpp\ncolumns = 1;\n```\n\nClass example:\n\n```cpp\nclass Columns\n{\n    class ColumnFavorite\n    {\n        x = \"1.2 * (((safezoneW / safezoneH) min 1.2) / 40) + (SafezoneX)\";\n        w = \"(2 * (((safezoneW / safezoneH) min 1.2) / 40))\";\n    };\n    class ColumnServer\n    {\n        x = \"2.7 * (((safezoneW / safezoneH) min 1.2) / 40) + (SafezoneX)\";\n        w = \"(11 * (((safezoneW / safezoneH) min 1.2) / 40)) + 0.45*(safezoneW - ((safezoneW / safezoneH) min 1.2))\";\n    };\n    class ColumnType\n    {\n        x = \"safezoneX + (15 * (((safezoneW / safezoneH) min 1.2) / 40)) + 0.45*(safezoneW - ((safezoneW / safezoneH) min 1.2))\";\n        w = \"3 * (((safezoneW / safezoneH) min 1.2) / 40)\";\n    };\n    class ColumnMission\n    {\n        x = \"safezoneX + (18.3 * (((safezoneW / safezoneH) min 1.2) / 40)) + 0.45*(safezoneW - ((safezoneW / safezoneH) min 1.2))\";\n        w = \"(10.5 * (((safezoneW / safezoneH) min 1.2) / 40)) + 0.45*(safezoneW - ((safezoneW / safezoneH) min 1.2))\";\n    };\n    class ColumnState\n    {\n        x = \"safezoneX + (29.1 * (((safezoneW / safezoneH) min 1.2) / 40)) + 0.9*(safezoneW - ((safezoneW / safezoneH) min 1.2))\";\n        w = \"3 * (((safezoneW / safezoneH) min 1.2) / 40)\";\n    };\n    class ColumnPlayers\n    {\n        x = \"safezoneX + (32.4 * (((safezoneW / safezoneH) min 1.2) / 40)) + 0.9*(safezoneW - ((safezoneW / safezoneH) min 1.2))\";\n        w = \"3 * (((safezoneW / safezoneH) min 1.2) / 40)\";\n    };\n    class ColumnPing\n    {\n        x = \"safezoneX + (35.7 * (((safezoneW / safezoneH) min 1.2) / 40)) + 0.9*(safezoneW - ((safezoneW / safezoneH) min 1.2))\";\n        w = \"3 * (((safezoneW / safezoneH) min 1.2) / 40)\";\n    };\n};\n```"},{"heading":"D","level":4,"markdown":""},{"heading":"disabled","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\ndisabled = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaysinglemission\\none_ca.paa\";\n```"},{"heading":"disabledAI","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\ndisabledAI = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayersetup\\disabledai_ca.paa\";\n```"},{"heading":"disabledCtrlColor","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\ndisabledCtrlColor[] = {1,1,1,0.5};\n```"},{"heading":"disabledKeyColor","level":5,"markdown":"**Type:** Array\n\n**Description:** Color of the disabled key binding; default {0.3,0.3,0.3,1} - Only relevant to config keys dialog (type = 5; idc = 102)\n\n```cpp\ndisabledKeyColor[] = {0.4,0.4,0.4,1};\n```"},{"heading":"DLCTemplate","level":5,"markdown":"**Type:** Class\n\n**Description:** n/a\n\n```cpp\nclass DLCTemplate\n{\n    class controls\n    {\n        class DlcBg\n        {\n            idc = 101;\n            text = \"\\A3\\Ui_f\\data\\GUI\\Rsc\\RscDisplayInventory\\InventoryStripe_ca.paa\";\n            color[] = {1,1,1,1};\n            x = 0;\n            y = 0;\n            w = \"1.8 * (((safezoneW / safezoneH) min 1.2) / 40)\";\n            h = \"1.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)\";\n        };\n        class DlcIcon\n        {\n            idc = 100;\n            text = \"\";\n            color[] = {1,1,1,1};\n            x = \"0 * (((safezoneW / safezoneH) min 1.2) / 40)\";\n            y = \"0 * (((safezoneW / safezoneH) min 1.2) / 40)\";\n            w = \"1 * (((safezoneW / safezoneH) min 1.2) / 40)\";\n            h = \"1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)\";\n        };\n    };\n};\n```"},{"heading":"E","level":4,"markdown":""},{"heading":"enabled","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nenabled = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaysinglemission\\done_ca.paa\";\n```"},{"heading":"enabledAI","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nenabledAI = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayersetup\\enabledai_ca.paa\";\n```"},{"heading":"I","level":4,"markdown":""},{"heading":"idcx","level":5,"markdown":"**Type:** Number\n\n**Description:** Used in the Arsenal display for unknown reason.\n\n```cpp\nidcx = 974;\n```"},{"heading":"itemBackground","level":5,"markdown":"**Type:** Array\n\n**Description:** n/a\n\n```cpp\nitemBackground[] = {1,1,1,0.1};\n```"},{"heading":"Items","level":5,"markdown":"**Type:** Class\n\n**Description:** Default entries for the listbox columns.\n\n```cpp\n// Yes, this is a vanilla config :D\nclass Items\n{\n    class Item0\n    {\n        text = \"LOL\";\n        textRight = \"ROFL\";\n        tooltip = \"OMG\";\n        picture = \"\\a3\\Ui_f\\data\\Map\\Markers\\Military\\warning_CA.paa\";\n        pictureRight = \"\\a3\\Ui_f\\data\\Map\\Markers\\Military\\unknown_CA.paa\";\n        color[] = {1,0,1,1};\n        colorRight[] = {1,1,0,1};\n        colorPicture[] = {0,1,1,1};\n        colorPictureSelected[] = {1,0,0,1};\n        colorPictureDisabled[] = {0,0,0,1};\n        colorPictureRight[] = {0,1,0,1};\n        colorPictureRightSelected[] = {0,0,1,1};\n        colorPictureRightDisabled[] = {0,0,0,1};\n        data = \"WTF\";\n        value = 42;\n        default = 0;\n    };\n    class AnotherItem\n    {\n        text = \"O RLY\";\n        default = 1;\n    };\n};\n```"},{"heading":"itemSpacing","level":5,"markdown":"**Type:** Number\n\n**Description:** n/a\n\n```cpp\nitemSpacing = 0;\n```"},{"heading":"L","level":4,"markdown":""},{"heading":"ListScrollBar","level":5,"markdown":"**Type:** Class\n\n**Description:** Prior to Arma 3 use ScrollBar. Scrollbars might not show if h and w properties of the ListBox are not 0. see also DialogControls-Sliders\n\n```cpp\nclass ListScrollBar\n{\n    color[] = {1,1,1,1};\n    autoScrollEnabled = 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    autoScrollSpeed = -1;\n    autoScrollDelay = 5;\n    autoScrollRewind = 0;\n};\n```"},{"heading":"locked","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nlocked = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\sessions_locked_ca.paa\";\n```"},{"heading":"M","level":4,"markdown":""},{"heading":"mainCollumW","level":5,"markdown":"**Type:** Number\n\n**Description:** Width of the left column 0..1; default 0.4 - Only relevant to config keys dialog (type = 5; idc = 102)\n\n```cpp\nmainCollumW = 0.4;\n```"},{"heading":"maxHistoryDelay","level":5,"markdown":"**Type:** Number\n\n**Description:** n/a\n\n```cpp\nmaxHistoryDelay = 1;\n```"},{"heading":"mods","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nmods = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\sessions_mods_ca.paa\";\n```"},{"heading":"N","level":4,"markdown":""},{"heading":"none","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nnone = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\sessions_none_ca.paa\";\n```"},{"heading":"P","level":4,"markdown":""},{"heading":"password","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\npassword = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\sessions_password_ca.paa\";\n```"},{"heading":"period","level":5,"markdown":"**Type:** Number\n\n**Description:** Controls how fast the color changes from colorXXX to colorXXX2.\n\n```cpp\nperiod = 1.2;\n```"},{"heading":"R","level":4,"markdown":""},{"heading":"rowHeight","level":5,"markdown":"**Type:** Number, String\n\n**Description:** The height of a single row.\n\nNumber example:\n\n```cpp\nrowHeight = 0;\n```\n\nString example:\n\n```cpp\nrowHeight = \"1.75 * (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)\";\n```"},{"heading":"rows","level":5,"markdown":"**Type:** Number\n\n**Description:** n/a\n\n```cpp\nrows = 8;\n```"},{"heading":"S","level":4,"markdown":""},{"heading":"secndCollumW","level":5,"markdown":"**Type:** Number\n\n**Description:** Width of the right column 0..1; default 0.6 - Only relevant to config keys dialog (type = 5; idc = 102)\n\n```cpp\nsecndCollumW = 0.6;\n```"},{"heading":"serverDislike","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nserverDislike = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\mp_serverdislike_ca.paa\";\n```"},{"heading":"serverEmpty","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nserverEmpty = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\mp_serverempty_ca.paa\";\n```"},{"heading":"serverLike","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nserverLike = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\mp_serverlike_ca.paa\";\n```"},{"heading":"sizeEx2","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nsizeEx2 = \"0.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)\";\n```"},{"heading":"soundSelect","level":5,"markdown":"**Type:** Array\n\n**Description:** Sound played when an entry is selected.\n\n```cpp\nsoundSelect[] = {\"\\A3\\ui_f\\data\\sound\\RscListbox\\soundSelect\",0.09,1};\n```"},{"heading":"star","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nstar = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\sessions_star_ca.paa\";\n```"},{"heading":"V","level":4,"markdown":""},{"heading":"version","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nversion = \"a3\\ui_f\\data\\gui\\rsc\\rscdisplaymultiplayer\\sessions_version_ca.paa\";\n```"},{"heading":"W","level":4,"markdown":""},{"heading":"wholeHeight","level":5,"markdown":"**Type:** Number\n\n**Description:** n/a\n\n```cpp\nwholeHeight = 0.21;\n```"},{"heading":"Default Classes","level":3,"markdown":"> [!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 (see the import keyword).\n>\n> In older versions, use `\"Default\" call BIS_fnc_exportGUIBaseClasses;` and paste the result into the description.ext."},{"heading":"RscListBox","level":4,"markdown":"```cpp\nclass RscListBox\n{\n    deletable = 0;\n    fade = 0;\n    access = 0;\n    type = CT_LISTBOX;\n    rowHeight = 0;\n    colorText[] = {1,1,1,1};\n    colorDisabled[] = {1,1,1,0.25};\n    colorScrollbar[] = {1,0,0,0};\n    colorSelect[] = {0,0,0,1};\n    colorSelect2[] = {0,0,0,1};\n    colorSelectBackground[] = {0.95,0.95,0.95,1};\n    colorSelectBackground2[] = {1,1,1,0.5};\n    colorBackground[] = {0,0,0,0.3};\n    soundSelect[] =\n    {\n        \"\\A3\\ui_f\\data\\sound\\RscListbox\\soundSelect\",\n        0.09,\n        1\n    };\n    autoScrollSpeed = -1;\n    autoScrollDelay = 5;\n    autoScrollRewind = 0;\n    arrowEmpty = \"#(argb,8,8,3)color(1,1,1,1)\";\n    arrowFull = \"#(argb,8,8,3)color(1,1,1,1)\";\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    class ListScrollBar : ScrollBar\n    {\n        color[] = {1,1,1,1};\n        autoScrollEnabled = 1;\n    };\n    x = 0;\n    y = 0;\n    w = 0.3;\n    h = 0.3;\n    style = LB_TEXTURES;\n    font = \"RobotoCondensed\";\n    sizeEx = GUI_TEXT_SIZE_MEDIUM;\n    shadow = 0;\n    colorShadow[] = {0,0,0,0.5};\n    period = 1.2;\n    maxHistoryDelay = 1;\n};\n```"},{"heading":"Scripting Example","level":4,"markdown":"| Code | Picture |\n|---|---|\n| ```sqf<br>{<br>    private _ctrl = _x;<br>    {<br>        _ctrl lbAdd getText (_x >> \"displayName\");<br>        _ctrl lbSetPicture [_foreachindex,getText (_x >> \"texture\")];<br>        _ctrl lbSetTooltip [_foreachindex,getText (_x >> \"displayName\")];<br>    } forEach (\"true\" configClasses (configFile >> \"CfgRanks\"));<br>    _ctrl lbSetCurSel 0;<br>``` |  |\n| ```sqf<br>    private _current = lbCurSel _ctrl;<br>    _ctrl lbSetData [_current,\"hi\"];<br>    private _data = _ctrl lbData _current;<br>    private _pic = _ctrl lbPicture _current;<br>    _ctrl lbSetValue [_current, 1];<br>    private _value = _ctrl lbValue _current;<br>    private _size = lbSize _ctrl;<br>    private _color = _ctrl lbColor _current;<br>    _ctrl lbSetColor [_current, [(_color select 0) / 2, (_color select 1) / 4, 0, 1]];<br>``` |  |\n| ```sqf<br>    lbSort [_ctrl, \"DESC\"];<br>    lbSortByValue _ctrl;<br>``` |  |\n| ```sqf<br>    if (_ctrl lbIsSelected _current) then<br>    {<br>        _ctrl lbDelete _current;<br>        lbClear _ctrl;<br>    };<br>} forEach [_CT_COMBO, _CT_LISTBOX, _CT_XLISTBOX, _CT_XCOMBO];<br>``` |  |\n\nCT_LISTBOX command family can be used with CT_COMBO, CT_LISTBOX, CT_XLISTBOX and CT_XCOMBO."}],"categories":["Control Types"],"groups":["GUI"]}