{"name":"tvCollapse","operator":null,"title":"tvCollapse","type":"command","url":"https://community.bistudio.com/wiki/tvCollapse","revid":377801,"updated":"2026-01-03T04:01:37Z","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":"local","effect":"local","server_exec":false},"exec":null,"description":"Collapses tree item pointed to by the path. IDC means id of parent Tree View.","syntaxes":[{"syntax":"tvCollapse [idc, path]","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":"[] will collapse the whole tree and it will disappear","types":["Tree View Path"],"since":null,"text":"path: Tree View Path - [] will collapse the whole tree and it will disappear"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"[idc, path]","types":["Array"]}},{"syntax":"control tvCollapse path","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":"[] will collapse the whole tree and it will disappear","types":["Tree View Path"],"since":null,"text":"path: Tree View Path - [] will collapse the whole tree and it will disappear"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"control","types":["Control"]},"right":{"text":"path","types":["Tree View Path"]}}],"examples":[{"text":"```sqf\ntvCollapse [101, [0]];\n```","code":["tvCollapse [101, [0]];"]},{"text":"```sqf\n_ctrl tvCollapse [0];\n```","code":["_ctrl tvCollapse [0];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["tvCollapseAll","tvAdd","tvClear","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetPicture","tvSetValue","tvSort","tvSortByValue","tvText","tvValue"],"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","Scripting Commands: Local Effect"]}