{"name":"ctrlPosition","title":"ctrlPosition","type":"command","url":"https://community.bistudio.com/wiki/ctrlPosition","revid":377302,"updated":"2026-01-02T06:38:20Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns the current position of 2D control as `[x, y, w, h]` array. For 3D control it returns relative `[x, z, y]`.\nIf the control is within a CT_CONTROLS_GROUP, the returned position will be relative to the group's position.\nIf the control is a CT_CONTROLS_TABLE header or row the returned position is relative to the table's position.","syntaxes":[{"syntax":"ctrlPosition controlName","params":[{"name":"controlName","type":"Control","type_expr":"Control"}],"returns":{"type":"Array","type_expr":"Array","description":"format `[x, y, w, h]` (2D) or `[x, z, y]` (3D)","text":"Array format `[x, y, w, h]` (2D) or `[x, z, y]` (3D)"},"form":"unary","right":{"text":"controlName"}}],"examples":[{"code":["_pos = ctrlPosition _control;"]}],"see_also":["ctrlCreate","ctrlDelete","ctrlModel","ctrlSetModel","ctrlSetPosition","ctrlClassName","displayCtrl","ctrlModelScale","ctrlSetModelScale","ctrlModelDirAndUp","ctrlSetModelDirAndUp"]}