tvSetPicture: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
m (Text replacement - "<code>([^<]*)<nowiki\/?>([^<]*)<\/code>" to "<code>$1$2</code>")
Line 30: Line 30:
|x1= <sqf>tvSetPicture [101, [0], "picture"];</sqf>
|x1= <sqf>tvSetPicture [101, [0], "picture"];</sqf>


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


|seealso= [[tvPicture]] [[tvSetPictureColor]] [[tvSetPictureRight]] [[tvSetPictureRightColor]]
|seealso= [[tvPicture]] [[tvSetPictureColor]] [[tvSetPictureRight]] [[tvSetPictureRightColor]]

Revision as of 10:28, 13 May 2022

{{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"];
};