lbSelection: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(added descrip[tion removed A3 note)
m (Text replacement - ">Posted on April ([0-9]{2})[ a-zA-Z]*, ([0-9]{4})" to ">Posted on $2-04-$1")
 
(66 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma |= Game name
|game1= arma1
|version1= 1.00


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


|arg= local |= Arguments in MP
|game3= arma2oa
|version3= 1.50


|eff= local |= Effects in MP
|game4= tkoh
____________________________________________________________________________________________
|version4= 1.00


| Returns [[Array]] of selected rows indices in the given listbox of style LB_MULTI (multi-selection). For single selection listbox use [[lbCurSel]] instead.|= Description
|game5= arma3
____________________________________________________________________________________________
|version5= 0.50


|'''lbSelection''' control |= Syntax
|gr1= GUI Control - ListBox


|p1= control: [[Control]] |= Parameter 1
|descr= Returns [[Array]] of selected rows indices in the given listbox. If listbox is of style LB_MULTI (multi-selection) the array will contain multiple elements, otherwise only a single element. For single selection listbox one can also use [[lbCurSel]]. See also [[lbIsSelected]], [[lbSetSelected]]


| [[Array]] |= Return value
|s1= [[lbSelection]] control
____________________________________________________________________________________________
 
|x1= <code>_indices = [[lbSelection]] _control;</code> |= Example 1
____________________________________________________________________________________________


| [[lbAdd]], [[lbClear]], [[lbColor]], [[lbCurSel]], [[lbData]], [[lbDelete]], [[lbIsSelected]], [[lbPicture]], [[lbSetColor]], [[lbSetCurSel]], [[lbSetData]], [[lbSetPicture]], [[lbSetSelected]], [[lbSetTooltip]], [[lbSetValue]], [[lbSize]], [[lbSort]], [[lbSortByValue]], [[lbText]], [[lbValue]] |= See also
|p1= control: [[Control]]


}}
|r1= [[Array]]


<h3 style="display:none">Notes</h3>
|x1= <sqf>_indices = lbSelection _control;</sqf>
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|seealso= [[lbAdd]] [[lbClear]] [[lbColor]] [[lbCurSel]] [[lbData]] [[lbDelete]] [[lbIsSelected]] [[lbPicture]] [[lbSetColor]] [[lbSetCurSel]] [[lbSetData]] [[lbSetPicture]] [[lbSetSelected]] [[lbSetTooltip]] [[lbSetValue]] [[lbSize]] [[lbSort]] [[lbSortByValue]] [[lbText]] [[lbValue]]
</dl>
}}


<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|LBSELECTION]]
[[Category:Scripting Commands ArmA|LBSELECTION]]
[[Category:Command_Group:_GUI_Control|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]


<!-- CONTINUE Notes -->
<dl class="command_description">
<dl class="command_description">
<dd class="notedate">Posted on April 10, 2016 - 16:50 (UTC)</dd>
 
<dt class="note">[[User:Larrow|Larrow]]</dt>
<dt></dt>
<dd class="notedate">Posted on 2020-04-24 - 11:39 (UTC)</dd>
<dt class="note">[[User:Dscha|Dscha]]</dt>
<dd class="note">
<dd class="note">
This command works fine with listboxs of style LB_MULTI and should not be marked as obsolete as lbCurSel does not provide the same functionality.
With the addition of '''RscListBoxMulti''' (in [[:Category:Introduced with Arma 3 version 1.98|{{arma3}} - 1.98]]), it is possible to get all the selected Rows with [[lbSelection]].
</dd>
</dd>
</dl>
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 23:07, 13 May 2023

Hover & click on the images for description

Description

Description:
Returns Array of selected rows indices in the given listbox. If listbox is of style LB_MULTI (multi-selection) the array will contain multiple elements, otherwise only a single element. For single selection listbox one can also use lbCurSel. See also lbIsSelected, lbSetSelected
Groups:
GUI Control - ListBox

Syntax

Syntax:
lbSelection control
Parameters:
control: Control
Return Value:
Array

Examples

Example 1:
_indices = lbSelection _control;

Additional Information

See also:
lbAdd lbClear lbColor lbCurSel lbData lbDelete lbIsSelected lbPicture lbSetColor lbSetCurSel lbSetData lbSetPicture lbSetSelected lbSetTooltip lbSetValue lbSize lbSort lbSortByValue 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 on 2020-04-24 - 11:39 (UTC)
Dscha
With the addition of RscListBoxMulti (in Arma 3 - 1.98), it is possible to get all the selected Rows with lbSelection.