{"name":"tvSetPicture","title":"tvSetPicture","type":"command","url":"https://community.bistudio.com/wiki/tvSetPicture","revid":378315,"updated":"2026-04-02T16:16:24Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","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.\n\n> [!NOTE]\n> - 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.\n>\n> One drawback of this method is that sorting the entries is not easily possible.\n>\n> - 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)`.","syntaxes":[{"syntax":"tvSetPicture [idc, path, name]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path, name]"}},{"syntax":"control tvSetPicture [path, name]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, name]"}}],"examples":[{"code":["tvSetPicture [101, [0], \"picture\"];"]},{"code":["_ctrl tvSetPicture [[0,0,0], getText (configFile >> \"CfgWeapons\" >> \"optic_NVS\" >> \"picture\")];"]},{"text":"Adding images in a scheduled environment:\n\n```sqf\nprivate _path = _ctrlTV tvAdd [[], \"Some Entry\"];\n[_ctrlTV, _path] spawn {\n    (_this select 0) tvSetPictureRight [[_this select 1], \"someImage.paa\"];\n};\n```","code":["private _path = _ctrlTV tvAdd [[], \"Some Entry\"];\n[_ctrlTV, _path] spawn {\n\t(_this select 0) tvSetPictureRight [[_this select 1], \"someImage.paa\"];\n};"]}],"see_also":["tvPicture","tvSetPictureColor","tvSetPictureRight","tvSetPictureRightColor"]}