{"name":"tvCurSel","operator":null,"title":"tvCurSel","type":"command","url":"https://community.bistudio.com/wiki/tvCurSel","revid":378354,"updated":"2026-04-02T16:36:18Z","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":"Returns path to currently selected item. IDC means id of parent Tree View.","syntaxes":[{"syntax":"tvCurSel 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":"Tree View Path","types":["Tree View Path"],"description":"selected item","text":"Tree View Path - selected item"},"form":"unary","operator":null,"left":null,"right":{"text":"idc","types":["Number"]}},{"syntax":"tvCurSel 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":"Tree View Path","types":["Tree View Path"],"description":"selected item","text":"Tree View Path - selected item"},"form":"unary","operator":null,"left":null,"right":{"text":"control","types":["Control"]}}],"examples":[{"text":"```sqf\ntvCurSel 101;\n```","code":["tvCurSel 101;"]},{"text":"```sqf\ntvCurSel _ctrl;\n```","code":["tvCurSel _ctrl;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["tvAdd","tvClear","tvCollapse","tvCount","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"]}