{"name":"tvSetPicture","operator":null,"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","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"0.74"}],"since":{"game":"arma3","name":"Arma 3","version":"0.74"},"arma3_since":"0.74","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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> One drawback of this method is that sorting the entries is not easily possible.\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 `1. (rgb,32,32,3)color(1,1,1,0)`.","syntaxes":[{"syntax":"tvSetPicture [idc, path, name]","since":null,"effect":null,"exec":null,"params":[{"name":"idc","type":"Number","optional":false,"default":null,"description":null,"types":["Number"],"since":null,"text":"idc: Number"},{"name":"path","type":"Tree View Path","optional":false,"default":null,"description":null,"types":["Tree View Path"],"since":null,"text":"path: Tree View Path"},{"name":"name","type":"String","optional":false,"default":null,"description":null,"types":["String"],"since":null,"text":"name: String"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"[idc, path, name]","types":["Array"]}},{"syntax":"control tvSetPicture [path, name]","since":null,"effect":null,"exec":null,"params":[{"name":"control","type":"Control","optional":false,"default":null,"description":null,"types":["Control"],"since":null,"text":"control: Control"},{"name":"path","type":"Tree View Path","optional":false,"default":null,"description":null,"types":["Tree View Path"],"since":null,"text":"path: Tree View Path"},{"name":"name","type":"String","optional":false,"default":null,"description":null,"types":["String"],"since":null,"text":"name: String"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"control","types":["Control"]},"right":{"text":"[path, name]","types":["Array"]}}],"examples":[{"text":"```sqf\ntvSetPicture [101, [0], \"picture\"];\n```","code":["tvSetPicture [101, [0], \"picture\"];"]},{"text":"```sqf\n_ctrl tvSetPicture [[0,0,0], getText (configFile >> \"CfgWeapons\" >> \"optic_NVS\" >> \"picture\")];\n```","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};"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["tvPicture","tvSetPictureColor","tvSetPictureRight","tvSetPictureRightColor"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: GUI Control - Tree View","Introduced with Arma 3 version 0.74","Scripting Commands"]}