Arma 3 Scripting

Command in GUI Control - ListBox

lbAdd

Also available as Markdown and JSON, or read the original wiki page.

Description

Adds an item with the given text to the CT_LISTBOX or CT_COMBO or CT_TOOLBOX.

Note

If using RscToolBox as template with ctrlCreate, clear it first with lbClear

Syntax

Syntax 1

lbAdd [idc, text]

Parameters:

Returns: Number - index (row) of newly added item

Syntax 2

control lbAdd text

Parameters:

Returns: Number - index (row) of newly added item

Examples

Example 1

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

Example 2

_index = _control lbAdd "First item";

See also

lbDelete · lbText