{"name":"ctrlEnabled","title":"ctrlEnabled","type":"command","url":"https://community.bistudio.com/wiki/ctrlEnabled","revid":338573,"updated":"2023-03-20T14:59:19Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"local"},"description":"Returns if a control on the currently active user dialog is enabled. Disabled controls cannot be focused. Read Arma: GUI Configuration for more information about user dialogs and controls.","syntaxes":[{"syntax":"ctrlEnabled idc","params":[{"name":"idc","type":"Number","description":"control's IDC","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if the control is enabled, false if not"},"form":"unary","right":{"text":"idc"}},{"syntax":"ctrlEnabled controlName","params":[{"name":"controlName","type":"Control","type_expr":"Control"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if the control is enabled, false if not"},"form":"unary","right":{"text":"controlName"}}],"examples":[{"text":"```sqf\nif !(ctrlEnabled 100) then\n{\n    ctrlEnable [100, true];\n};\n```","code":["if !(ctrlEnabled 100) then\n{\n\tctrlEnable [100, true];\n};"]},{"code":["_enabled = ctrlEnabled _control;"]}],"see_also":["ctrlEnable"]}