lbSortByValue: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Take[ _]On[ _]Helicopters(\|.*)?\]\]" to "{{GameCategory|tkoh|Scripting Commands}}")
m (Text replacement - "[Rr]oehre" to "RoehrenRadio")
 
(24 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


|arma1|Game name=
|game1= arma1
|version1= 1.08


|1.08|Game version=
|game2= arma2
|version2= 1.00


|gr1= GUI Control - ListBox |GROUP1=
|game3= arma2oa
____________________________________________________________________________________________
|version3= 1.50


| 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. |DESCRIPTION=
|game4= tkoh
____________________________________________________________________________________________
|version4= 1.00


| '''lbSortByValue''' control |SYNTAX=
|game5= arma3
|version5= 0.50


|p1= control: [[Control]]  |PARAMETER1=
|gr1= GUI Control - ListBox


| [[Nothing]] |RETURNVALUE=
|descr= 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 {{arma3}} use [[lbSortBy]] to avoid this problem.


|s2= '''lbSortByValue''' idc {{since|arma3|1.67|y}} |SYNTAX2=
|s1= [[lbSortByValue]]  control


|p21= idc: [[Number]] |PARAMETER21=
|p1= control: [[Control]]


|r2= [[Nothing]] |RETURNVALUE2=
|r1= [[Nothing]]
____________________________________________________________________________________________
 
|x1= <code>[[lbSortByValue]] _control;</code>|EXAMPLE1=


|x2= <code>[[lbSortByValue]] 101;</code>|EXAMPLE2=
|s2= [[lbSortByValue]] idc
____________________________________________________________________________________________


| [[lbSort]], [[lnbSort]], [[tvSort]], [[tvSortByValue]], [[lnbSortByValue]], [[lbAdd]], [[lbClear]], [[lbColor]], [[lbCurSel]], [[lbData]], [[lbDelete]], [[lbIsSelected]], [[lbPicture]], [[lbSelection]], [[lbSetColor]], [[lbSetCurSel]], [[lbSetData]], [[lbSetPicture]], [[lbSetSelected]], [[lbSetTooltip]], [[lbSetValue]], [[lbSize]], [[lbSort]], [[lbText]], [[lbValue]] |SEEALSO=
|s2since= arma3 1.68
 
|p21= idc: [[Number]]
 
|r2= [[Nothing]]
 
|x1= <sqf>lbSortByValue _control;</sqf>
 
|x2= <sqf>lbSortByValue 101;</sqf>
 
|seealso= [[lbSortBy]] [[lbSort]]
}}
}}


<h3 style="display:none">Notes</h3>
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
 
<dt></dt>
<dd class="notedate">January 1st, 2011 - 22:54
<dd class="notedate">January 1st, 2011 - 22:54
<dt class="note">[[User:roehre|Roehre]]
<dt class="note">[[User:RoehrenRadio|RoehrenRadio]]</dt>
<dd class="note">
<dd class="note">
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.  
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.  
Line 43: Line 51:
<dt class="note">[[User:ffur2007slx2_5|ffur2007slx2_5]]</dt>
<dt class="note">[[User:ffur2007slx2_5|ffur2007slx2_5]]</dt>
<dd class="note">More information on the LB command family can be found [[List_Box|here]]
<dd class="note">More information on the LB command family can be found [[List_Box|here]]
<!-- Note Section END -->
</dl>
</dl>
<h3 style="display:none">Bottom Section</h3>
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}

Latest revision as of 10:49, 8 April 2024

Hover & click on the images for description

Description

Description:
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.
Groups:
GUI Control - ListBox

Syntax

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

Alternative Syntax

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

Examples

Example 1:
lbSortByValue _control;
Example 2:
lbSortByValue 101;

Additional Information

See also:
lbSortBy lbSort

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
January 1st, 2011 - 22:54
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.
Posted: Sep 10 2014
ffur2007slx2_5
More information on the LB command family can be found here