Arma 3 Scripting

Function in GUI

BIS_fnc_initListNBoxSorting

Also available as Markdown and JSON, or read the original wiki page.

Description

Automatically creates buttons and sets them up so they can be used to sort a CT_LISTNBOX. The buttons will automatically be resized to fit the column width of ctrlFilter.

By default, the ctrlContent columns are sorted by lnbText (using lnbSort). If a specific column should be sorted by lnbValue (using lnbSortByValue) instead, then something needs to be set in the data of the corresponding ctrlFilter column (literally something, the condition in the source code is (_ctrlFilter lnbData [0, _i]) != "").

Regarding ctrlFilter:

Syntax

[ctrlFilter, ctrlContent, columnIndexes, idc] call BIS_fnc_initListNBoxSorting

Parameters:

Returns: Boolean - true on success, otherwise false

Examples

Example 1

[_lnbFilter, _lnbContent, [0,1,2,3]] call BIS_fnc_initListNBoxSorting;

See also

BIS_fnc_initSliderValue