---
name: "lbSelection"
type: command
status: ok
groups: ["GUI Control - ListBox"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/lbSelection
revid: 377149
updated: 2026-01-01T10:35:25Z
---

# lbSelection

*Command · GUI Control - ListBox · Arma 3 v0.50 · introduced in Armed Assault v1.00*

## Description

Returns [Array](../topics/Array.md) 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](../commands/lbCurSel.md). See also [lbIsSelected](../commands/lbIsSelected.md), [lbSetSelected](../commands/lbSetSelected.md)

## Syntax

```sqf
lbSelection control
```

**Parameters:**

- `control`: [Control](../topics/Control.md)

**Returns:** [Array](../topics/Array.md) of [Number](../topics/Number.md)s

## Examples

### Example 1

```sqf
_indices = lbSelection _control;
```

## See also

[lbAdd](../commands/lbAdd.md) · [lbClear](../commands/lbClear.md) · [lbColor](../commands/lbColor.md) · [lbCurSel](../commands/lbCurSel.md) · [lbData](../commands/lbData.md) · [lbDelete](../commands/lbDelete.md) · [lbIsSelected](../commands/lbIsSelected.md) · [lbPicture](../commands/lbPicture.md) · [lbSetColor](../commands/lbSetColor.md) · [lbSetCurSel](../commands/lbSetCurSel.md) · [lbSetData](../commands/lbSetData.md) · [lbSetPicture](../commands/lbSetPicture.md) · [lbSetSelected](../commands/lbSetSelected.md) · [lbSetTooltip](../commands/lbSetTooltip.md) · [lbSetValue](../commands/lbSetValue.md) · [lbSize](../commands/lbSize.md) · [lbSort](../commands/lbSort.md) · [lbSortByValue](../commands/lbSortByValue.md) · [lbText](../commands/lbText.md) · [lbValue](../commands/lbValue.md)

<sub>Source: [BI Community Wiki — lbSelection](https://community.bistudio.com/wiki/lbSelection) (revision 377149).</sub>
