{"name":"lbSortByValue","operator":null,"title":"lbSortByValue","type":"command","url":"https://community.bistudio.com/wiki/lbSortByValue","revid":363604,"updated":"2024-04-08T09:49:07Z","groups":["GUI Control - ListBox"],"status":"ok","replaced_by":[],"games":[{"game":"arma1","name":"Armed Assault","version":"1.08"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma1","name":"Armed Assault","version":"1.08"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Sorts the ListBox entries by lbValue. The entries are sorted in ascending order. Also note that this command will mix up the entries randomly if multiple entries have the same value. In Arma 3 use lbSortBy to avoid this problem.","syntaxes":[{"syntax":"lbSortByValue control","since":null,"effect":null,"exec":null,"params":[{"name":"control","type":"Control","optional":false,"default":null,"description":null,"types":["Control"],"since":null,"text":"control: Control"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"control","types":["Control"]}},{"syntax":"lbSortByValue idc","since":"arma3 1.68","effect":null,"exec":null,"params":[{"name":"idc","type":"Number","optional":false,"default":null,"description":null,"types":["Number"],"since":null,"text":"idc: Number"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"idc","types":["Number"]}}],"examples":[{"text":"```sqf\nlbSortByValue _control;\n```","code":["lbSortByValue _control;"]},{"text":"```sqf\nlbSortByValue 101;\n```","code":["lbSortByValue 101;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["lbSortBy","lbSort"],"notes":[],"categories":["ArmA: Armed Assault: New Scripting Commands","ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: GUI Control - ListBox","Introduced with Armed Assault version 1.08","Scripting Commands","Take On Helicopters: Scripting Commands"]}