---
name: "lbCurSel"
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/lbCurSel
revid: 349157
updated: 2023-11-08T14:49:50Z
---

# lbCurSel

*Command · GUI Control - ListBox · Arma 3 v0.50 · introduced in Operation Flashpoint v1.75*

## Description

Returns the index of the selected item of the CT_LISTBOX, CT_LISTNBOX, CT_COMBO or CT_TOOLBOX. For CT_LISTBOX with multi selection enabled use [lbSelection](../commands/lbSelection.md).

## Syntax

### Syntax 1

```sqf
lbCurSel idc
```

**Parameters:**

- `idc`: [Number](../topics/Number.md)

**Returns:** [Number](../topics/Number.md) - selected index (row) or -1 if nothing is selected

### Syntax 2

```sqf
lbCurSel control
```

**Parameters:**

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

**Returns:** [Number](../topics/Number.md) - selected index (row) or -1 if nothing is selected

## Examples

### Example 1

```sqf
_index = lbCurSel 101;
```

### Example 2

```sqf
lbCurSel _ctrl;
```

## See also

[lbIsSelected](../commands/lbIsSelected.md) · [lbSelection](../commands/lbSelection.md) · [lbSetCurSel](../commands/lbSetCurSel.md)

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