{"name":"lbCurSel","operator":null,"title":"lbCurSel","type":"command","url":"https://community.bistudio.com/wiki/lbCurSel","revid":349157,"updated":"2023-11-08T14:49:50Z","groups":["GUI Control - ListBox"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.75"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"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":"ofp","name":"Operation Flashpoint","version":"1.75"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns the index of the selected item of the CT_LISTBOX, CT_LISTNBOX, CT_COMBO or CT_TOOLBOX. For CT_LISTBOX with multi selection enabled use lbSelection.","syntaxes":[{"syntax":"lbCurSel idc","since":null,"effect":null,"exec":null,"params":[{"name":"idc","type":"Number","optional":false,"default":null,"description":null,"types":["Number"],"since":null,"text":"idc: Number"}],"returns":{"type":"Number","types":["Number"],"description":"selected index (row) or -1 if nothing is selected","text":"Number - selected index (row) or -1 if nothing is selected"},"form":"unary","operator":null,"left":null,"right":{"text":"idc","types":["Number"]}},{"syntax":"lbCurSel 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":"Number","types":["Number"],"description":"selected index (row) or -1 if nothing is selected","text":"Number - selected index (row) or -1 if nothing is selected"},"form":"unary","operator":null,"left":null,"right":{"text":"control","types":["Control"]}}],"examples":[{"text":"```sqf\n_index = lbCurSel 101;\n```","code":["_index = lbCurSel 101;"]},{"text":"```sqf\nlbCurSel _ctrl;\n```","code":["lbCurSel _ctrl;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["lbIsSelected","lbSelection","lbSetCurSel"],"notes":[],"categories":["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 Operation Flashpoint version 1.75","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Take On Helicopters: Scripting Commands"]}