lbSort: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
(alt syntax)
Line 8: Line 8:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Sorts listbox entries alphabetically ascending by their [[lbText]].
| Sorts listbox entries alphabetically ascending by their [[lbText]]
<br>Alternative syntax (available since {{arma3}} v1.18) allows descending sorting as well.
<br>Order could be:
* "ASC"
* "DESC"
|= Description
|= Description
____________________________________________________________________________________________
____________________________________________________________________________________________
Line 23: Line 19:
____________________________________________________________________________________________
____________________________________________________________________________________________


|s2= '''lbSort''' [control, sortOrder] |= Syntax
|s2= '''lbSort''' [control, sortOrder] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(''since Arma 3 v1.18'') |= Syntax


|p21=  control: [[Control]] |= Parameter 1
|p21=  control: [[Control]] |= Parameter 1
|p22=  sortOrder: [[String]] - see Description|= Parameter 2
|p22=  sortOrder: [[String]] - "ASC": ascending, "DESC": descending|= Parameter 2


|r2= [[Nothing]] |= Return value
|r2= [[Nothing]] |= Return value
____________________________________________________________________________________________
|s3= '''lbSort''' idc &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(''since Arma 3 v1.67'')|= Syntax
|p41=  idc: [[Number]] |= Parameter 1
|r3= [[Nothing]] |= Return value
|s4= '''lbSort''' [idc, sortOrder] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(''since Arma 3 v1.67'')|= Syntax
|p61=  idc: [[Number]] |= Parameter 1
|p62=  sortOrder: [[String]] - "ASC": ascending, "DESC": descending|= Parameter 2
|r4= [[Nothing]] |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>[[lbSort]] _myControl;</code>|= Example 1
|x1= <code>[[lbSort]] _myControl;</code>|= Example 1
|x2= <code>[[lbSort]] [_myControl, "DESC"];</code>|= Example 2
|x2= <code>[[lbSort]] [_myControl, "DESC"];</code>|= Example 2
|x3= <code>[[lbSort]] 101;</code>|= Example 3
|x4= <code>[[lbSort]] [101, "DESC"];</code>|= Example 4
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 18:28, 6 February 2017

-wrong parameter ("Arma") defined!-1.08
Hover & click on the images for description

Description

Description:
Sorts listbox entries alphabetically ascending by their lbText
Groups:
Uncategorised

Syntax 1

Syntax:
lbSort control
Parameters:
control: Control
Return Value:
Nothing

Syntax 2

Syntax:
lbSort [control, sortOrder]        (since Arma 3 v1.18)
Parameters:
control: Control
sortOrder: String - "ASC": ascending, "DESC": descending
Return Value:
Nothing

Syntax 3

Syntax:
lbSort idc        (since Arma 3 v1.67)
Parameters:
idc: Number
Return Value:
Nothing

Syntax 4

Syntax:
lbSort [idc, sortOrder]        (since Arma 3 v1.67)
Parameters:
idc: Number
sortOrder: String - "ASC": ascending, "DESC": descending
Return Value:
Nothing

Examples

Example 1:
lbSort _myControl;
Example 2:
lbSort [_myControl, "DESC"];
Example 3:
lbSort 101;
Example 4:
lbSort [101, "DESC"];

Additional Information

See also:
lbSortByValuelnbSorttvSortlbSortByValuetvSortByValuelnbSortByValuelbAddlbClearlbColorlbCurSellbDatalbDeletelbIsSelectedlbPicturelbSelectionlbSetColorlbSetCurSellbSetDatalbSetPicturelbSetSelectedlbSetTooltiplbSetValuelbSizelbTextlbValue

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Posted: Sep 10 2014
ffur2007slx2_5
More information on the LB command family can be found here

Bottom Section