{"name":"tvSort","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","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","description":"Sorts all children of given path. Text of Tree View entries is used for sorting.","syntaxes":[{"syntax":"control tvSort [path, reversed]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","description":"the parent item to sort","type_expr":"Tree View Path"},{"name":"reversed","type":"Boolean","optional":true,"default":"false","description":"true to reverse sort it","type_expr":"Boolean","text":"reversed: Boolean - (Optional, default false) true to reverse sort it"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, reversed]"}},{"syntax":"tvSort [idc, path, reversed]","params":[{"name":"idc","type":"Number","description":"control idc","type_expr":"Number"},{"name":"path","type":"Tree View Path","description":"the parent item to sort","type_expr":"Tree View Path"},{"name":"reversed","type":"Boolean","optional":true,"default":"false","description":"true to reverse sort it","type_expr":"Boolean","text":"reversed: Boolean - (Optional, default false) true to reverse sort it"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path, reversed]"}}],"examples":[{"code":["control tvSort [[0], true];"]},{"code":["tvSort [102, [0], true];"]}],"see_also":["lbSortBy","lnbSortBy","tvSortAll","tvSortByValue","tvSortByValueAll"]}