---
name: "lbSetPicture"
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/lbSetPicture
revid: 364161
updated: 2024-05-05T10:46:40Z
---

# lbSetPicture

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

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

## Description

Sets the left picture in the row with given index of CT_LISTBOX or CT_COMBO. The picture is searched for in the mission directory, the dtaExt subdirectory of the campaign directory and the dtaExt directory and the data bank (or directory).

> [!NOTE]
> **Arma 3:** In Arma 3 it might be necessary to set the color of the picture as well with [lbSetPictureColor](../commands/lbSetPictureColor.md) as default color `[0,0,0,0]` makes the picture invisible.

## Syntax

### Syntax 1

```sqf
lbSetPicture [idc, index, path]
```

**Parameters:**

- `idc`: [Number](../topics/Number.md) - control IDC
- `index`: [Number](../topics/Number.md)
- `path`: [String](../topics/String.md) - path to the picture

**Returns:** [Nothing](../topics/Nothing.md)

### Syntax 2

```sqf
control lbSetPicture [index, path]
```

**Parameters:**

- `control`: [Control](../topics/Control.md)
- `index`: [Number](../topics/Number.md)
- `path`: [String](../topics/String.md) - path to the picture

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
lbSetPicture [101, 0, "iskoda.paa"];
```

### Example 2

```sqf
_control lbSetPicture [0, "iskoda.paa"];
```

### Example 3

> [!NOTE]
> Adding pictures to lists is very slow. In order to prevent a list filling's possible slowdown, add the pictures in the **scheduled** environment using [spawn](../commands/spawn.md).
>
> One drawback of that method is that sorting the entries is not easily possible.

```sqf
private _path = _ctrlTV tvAdd [[], "Some Entry"];
[_ctrlTV, _path] spawn {
    (_this select 0) tvSetPictureRight [[_this select 1], "someImage.paa"];
};
```

## See also

[lbPicture](../commands/lbPicture.md) · [lbSetPictureColor](../commands/lbSetPictureColor.md) · [lbSetPictureRight](../commands/lbSetPictureRight.md)

## Community notes

**ffur2007slx2_5** — 2014-09-10

More information on the CT_LISTBOX command family can be found here.

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