{"name":"tvSort","operator":null,"title":"tvSort","type":"command","url":"https://community.bistudio.com/wiki/tvSort","revid":377597,"updated":"2026-01-02T07:01:07Z","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":"Sorts all children of given path. Text of Tree View entries is used for sorting.","syntaxes":[{"syntax":"control tvSort [path, reversed]","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":"the parent item to sort","types":["Tree View Path"],"since":null,"text":"path: Tree View Path - the parent item to sort"},{"name":"reversed","type":"Boolean","optional":true,"default":"false","description":"true to reverse sort it","types":["Boolean"],"since":null,"text":"reversed: Boolean - (Optional, default false) true to reverse sort it"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"control","types":["Control"]},"right":{"text":"[path, reversed]","types":["Array"]}},{"syntax":"tvSort [idc, path, reversed]","since":null,"effect":null,"exec":null,"params":[{"name":"idc","type":"Number","optional":false,"default":null,"description":"control idc","types":["Number"],"since":null,"text":"idc: Number - control idc"},{"name":"path","type":"Tree View Path","optional":false,"default":null,"description":"the parent item to sort","types":["Tree View Path"],"since":null,"text":"path: Tree View Path - the parent item to sort"},{"name":"reversed","type":"Boolean","optional":true,"default":"false","description":"true to reverse sort it","types":["Boolean"],"since":null,"text":"reversed: Boolean - (Optional, default false) true to reverse sort it"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"[idc, path, reversed]","types":["Array"]}}],"examples":[{"text":"```sqf\ncontrol tvSort [[0], true];\n```","code":["control tvSort [[0], true];"]},{"text":"```sqf\ntvSort [102, [0], true];\n```","code":["tvSort [102, [0], true];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["lbSortBy","lnbSortBy","tvSortAll","tvSortByValue","tvSortByValueAll"],"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"]}