Arma 3 Scripting

BIS_fnc_initListNBoxSorting

  • Arma 3 v1.56

Function · Markdown · JSON · 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:

See CT LISTNBOX - BIS_fnc_initListNBoxSorting Example for a full example including a config.

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