tvSetPicture

From Bohemia Interactive Community
Revision as of 11:28, 13 May 2022 by Lou Montana (talk | contribs) (Text replacement - "<code>([^<]*)<nowiki\/?>([^<]*)<\/code>" to "<code>$1$2</code>")
Jump to navigation Jump to search

{{RV|type=command

|game1= arma3 |version1= 0.74

|gr1= GUI Control - Tree View

|descr= 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.

|s1= tvSetPicture [idc, path, name]

|p1= idc: Number

|p2= path: Array of Numbers

|p3= name: String

|r1= Nothing

|s2= control tvSetPicture [path, name]

|p21= control: Control

|p22= path: Array of Numbers

|p23= name: String

|r2= Nothing

|x1=

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

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

|seealso= tvPicture tvSetPictureColor tvSetPictureRight tvSetPictureRightColor }}

Posted on April 5, 2021 - 12:22 (UTC)
R3vo
Adding pictures to lists is very slow. In order to prevent the filling of the list to be slowed down, add the pictures in the scheduled environment. One drawback of that method is, that sorting the entries is not easily possible. private _path = _ctrlTV tvAdd [[], "Some Entry"];
[_ctrlTV, _path] spawn {
(_this select 0) tvSetPictureRight [[_this select 1], "someImage.paa"];
};