Arma 3 Scripting

tvSetPicture

  • Arma 3 v0.74

Command · Markdown · JSON · original wiki page

Description

Sets picture to item selected by path. IDC means id of parent Tree View. Name is picture name. The picture is searched in the mission directory.

Note

  • Adding pictures to lists is very slow. In order to prevent the filling of the list to be slowed down, add the pictures in a scheduled environment - See Example 3.

One drawback of this method is that sorting the entries is not easily possible.

  • If not all items have a picture but you still want them to be aligned at the front, use a Procedural Texture that is transparent #(rgb,32,32,3)color(1,1,1,0).

Syntax

Syntax 1

tvSetPicture [idc, path, name]

Parameters:

Returns: Nothing

Syntax 2

control tvSetPicture [path, name]

Parameters:

Returns: Nothing

Examples

Example 1

tvSetPicture [101, [0], "picture"];

Example 2

_ctrl tvSetPicture [[0,0,0], getText (configFile >> "CfgWeapons" >> "optic_NVS" >> "picture")];

Example 3

Adding images in a scheduled environment:

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

See also

tvPicture · tvSetPictureColor · tvSetPictureRight · tvSetPictureRightColor