lbSort: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *arma1 * * *\| *([0-1]\.[0-9]{2}) * (\| *.[^a])" to "|game1= arma1 |version1= $1 |game2= arma2 |version2= 1.00 |game3= arma2oa |version3= 1.50 |game4= tkoh |version4= 1.00 |game5= arma3 |version5= 0.50 $2")
m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
 
(34 intermediate revisions by the same user not shown)
Line 20: Line 20:
|descr= Sorts listbox entries alphabetically ascending by their [[lbText]].
|descr= Sorts listbox entries alphabetically ascending by their [[lbText]].


|s1= [[lbSort]] control
|s1= [[lbSort]] control


|p1= control: [[Control]]
|p1= control: [[Control]]


|r1= [[Nothing]]
|r1= [[Nothing]]


|s2= [[lbSort]] [control, sortOrder] {{Since|arma3|1.18|y}}
|s2= [[lbSort]] [control, sortOrder]


|p21= control: [[Control]]
|s2since= arma3 1.18
|p22= sortOrder: [[String]] - "ASC": ascending, "DESC": descending
 
|p21= control: [[Control]]
|p22= sortOrder: [[String]] - "ASC": ascending, "DESC": descending


|r2= [[Nothing]]
|r2= [[Nothing]]


|s3= [[lbSort]] idc {{Since|arma3|1.67|y}}
|s3= [[lbSort]] idc
 
|s3since= arma3 1.68


|p41= idc: [[Number]]
|p41= idc: [[Number]]


|r3= [[Nothing]]
|r3= [[Nothing]]


|s4= [[lbSort]] [idc, sortOrder] {{Since|arma3|1.67|y}}
|s4= [[lbSort]] [idc, sortOrder]
 
|s4since= arma3 1.68


|p61= idc: [[Number]]
|p61= idc: [[Number]]


|p62= sortOrder: [[String]] - "ASC": ascending, "DESC": descending
|p62= sortOrder: [[String]] - "ASC": ascending, "DESC": descending


|r4= [[Nothing]]
|r4= [[Nothing]]


|x1= <code>[[lbSort]] _myControl;</code>
|x1= <sqf>lbSort _myControl;</sqf>
|x2= <code>[[lbSort]] [_myControl, "DESC"];</code>
|x2= <sqf>lbSort [_myControl, "DESC"];</sqf>
|x3= <code>[[lbSort]] 101;</code>
|x3= <sqf>lbSort 101;</sqf>
|x4= <code>[[lbSort]] [101, "DESC"];</code>
|x4= <sqf>lbSort [101, "DESC"];</sqf>


|seealso= [[lbSortBy]], [[lnbSortBy]], [[lbSortByValue]], [[lnbSort]], [[tvSort]], [[lbSortByValue]], [[tvSortByValue]], [[lnbSortByValue]], [[lbAdd]], [[lbClear]], [[lbColor]], [[lbCurSel]], [[lbData]], [[lbDelete]], [[lbIsSelected]], [[lbPicture]], [[lbSelection]], [[lbSetColor]], [[lbSetCurSel]], [[lbSetData]], [[lbSetPicture]], [[lbSetSelected]], [[lbSetTooltip]], [[lbSetValue]], [[lbSize]], [[lbText]], [[lbValue]]
|seealso= [[lbSortBy]] [[lnbSortBy]] [[lbSortByValue]] [[lnbSort]] [[tvSort]] [[lbSortByValue]] [[tvSortByValue]] [[lnbSortByValue]] [[lbAdd]] [[lbClear]] [[lbColor]] [[lbCurSel]] [[lbData]] [[lbDelete]] [[lbIsSelected]] [[lbPicture]] [[lbSelection]] [[lbSetColor]] [[lbSetCurSel]] [[lbSetData]] [[lbSetPicture]] [[lbSetSelected]] [[lbSetTooltip]] [[lbSetValue]] [[lbSize]] [[lbText]] [[lbValue]]
}}
}}


Line 62: Line 68:
<dd class="note">More information on the LB command family can be found on the [[List Box]] page.
<dd class="note">More information on the LB command family can be found on the [[List Box]] page.
</dl>
</dl>
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}

Latest revision as of 10:23, 13 May 2022

Hover & click on the images for description

Description

Description:
Sorts listbox entries alphabetically ascending by their lbText.
Groups:
GUI Control - ListBox

Syntax 1

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

Syntax 2

Syntax:
lbSort [control, sortOrder]
Parameters:
control: Control
sortOrder: String - "ASC": ascending, "DESC": descending
Return Value:
Nothing

Syntax 3

Syntax:
lbSort idc
Parameters:
idc: Number
Return Value:
Nothing

Syntax 4

Syntax:
lbSort [idc, sortOrder]
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:
lbSortBy lnbSortBy lbSortByValue lnbSort tvSort lbSortByValue tvSortByValue lnbSortByValue lbAdd lbClear lbColor lbCurSel lbData lbDelete lbIsSelected lbPicture lbSelection lbSetColor lbSetCurSel lbSetData lbSetPicture lbSetSelected lbSetTooltip lbSetValue lbSize lbText lbValue

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
Posted: Sep 10 2014
ffur2007slx2_5
More information on the LB command family can be found on the List Box page.