---
name: "lbAdd"
type: command
status: ok
groups: ["GUI Control - ListBox"]
arma3_since: "0.50"
locality: {"argument": "local", "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/lbAdd
revid: 379428
updated: 2026-10-31T00:05:13Z
---

# lbAdd

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

Locality: arguments **local** · effect **local**

## Description

Adds an item with the given text to the [CT_LISTBOX](../topics/CT_LISTBOX.md) or [CT_COMBO](../topics/CT_COMBO.md) or [CT_TOOLBOX](../topics/CT_TOOLBOX.md).

> [!NOTE]
> If using `RscToolBox` as template with [ctrlCreate](../commands/ctrlCreate.md), clear it first with [lbClear](../commands/lbClear.md)

## Syntax

### Syntax 1

```sqf
lbAdd [idc, text]
```

**Parameters:**

- `idc`: [Number](../topics/Number.md) - control IDC
- `text`: [String](../topics/String.md) - visible text

**Returns:** [Number](../topics/Number.md) - index (row) of newly added item

### Syntax 2

```sqf
control lbAdd text
```

**Parameters:**

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

**Returns:** [Number](../topics/Number.md) - index (row) of newly added item

## Examples

### Example 1

```sqf
_index = lbAdd [101, "First item"];
```

### Example 2

```sqf
_index = _control lbAdd "First item";
```

## See also

[lbDelete](../commands/lbDelete.md) · [lbText](../commands/lbText.md)

## Community notes

**ffur2007slx2_5** — 2014-09-10

More information on the [CT_LISTBOX](../topics/CT_LISTBOX.md) command family can be found [here](../topics/CT_LISTBOX.md#scripting-example).

---

**Nelis75733126** — 2015-04-12

This command can be very very frustrating to use because it does not output any errors if unable to function.\
Often, the 2nd provided syntax needs to be used like this:

```sqf
_giveYourControlAname = findDisplay 7 displayCtrl 9;
_addThisToListBox = "Option";
_giveYourControlAname lbAdd _addThisToListBox;
```

Where "7" is the "idd" of the dialog you made in your ".hpp" file and where "9" is the "idc" of the RscListBox or RscComboBox.\
The code above will add an option named "Option" to the ListBox or ComboBox.

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