lbSelection: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
 
m (Text replacement - ">Posted on April ([0-9]{2})[ a-zA-Z]*, ([0-9]{4})" to ">Posted on $2-04-$1")
 
(84 intermediate revisions by 15 users not shown)
Line 1: Line 1:
[[Category:Scripting Commands|LBSELECTION]]
{{RV|type=command
[[Category:Scripting Commands ArmA|LBSELECTION]]


|game1= arma1
|version1= 1.00


<h2 style="color:#000066"> '''lbSelection ''control'''''</h2>
|game2= arma2
|version2= 1.00


|game3= arma2oa
|version3= 1.50


'''Operand types:'''
|game4= tkoh
|version4= 1.00


'''control:''' [[Control]]
|game5= arma3
|version5= 0.50


'''Type of returned value:'''
|gr1= GUI Control - ListBox


[[Array]]
|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]]


'''Compatibility:'''
|s1= [[lbSelection]] control


Version 2.92 required.
|p1= control: [[Control]]


'''Description:'''
|r1= [[Array]]


Returns the array of selected rows indices in the given listbox
|x1= <sqf>_indices = lbSelection _control;</sqf>


|seealso= [[lbAdd]] [[lbClear]] [[lbColor]] [[lbCurSel]] [[lbData]] [[lbDelete]] [[lbIsSelected]] [[lbPicture]] [[lbSetColor]] [[lbSetCurSel]] [[lbSetData]] [[lbSetPicture]] [[lbSetSelected]] [[lbSetTooltip]] [[lbSetValue]] [[lbSize]] [[lbSort]] [[lbSortByValue]] [[lbText]] [[lbValue]]
}}


'''Example:'''


_indices = '''lbSelection''' _control
<dl class="command_description">
 
<dt></dt>
<dd class="notedate">Posted on 2020-04-24 - 11:39 (UTC)</dd>
<dt class="note">[[User:Dscha|Dscha]]</dt>
<dd class="note">
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>
 
</dl>

Latest revision as of 00:07, 14 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.