RoehrenRadio
A good way to avoid that this Command will mix your Listbox up is, to assign your Value summed up with the Index ID returned by lbAdd to your Listbox Entries.
Results appear below as you type; use the arrow keys to move through them.
Command · Markdown · JSON · original wiki page
Sorts the ListBox entries by lbValue. The entries are sorted in ascending order. Also note that this command will mix up the entries randomly if multiple entries have the same value. In Arma 3 use lbSortBy to avoid this problem.
lbSortByValue control
Parameters:
control: ControlReturns: Nothing
since arma3 1.68
lbSortByValue idc
Parameters:
idc: NumberReturns: Nothing
lbSortByValue _control;
lbSortByValue 101;
A good way to avoid that this Command will mix your Listbox up is, to assign your Value summed up with the Index ID returned by lbAdd to your Listbox Entries.
More information on the LB command family can be found here