{"name":"ctrlEnabled","operator":null,"title":"ctrlEnabled","type":"command","url":"https://community.bistudio.com/wiki/ctrlEnabled","revid":338573,"updated":"2023-03-20T14:59:19Z","groups":["GUI Control"],"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":"local","effect":null,"server_exec":false},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[{"name":"idc","type":"Number","optional":false,"default":null,"description":"control's IDC","types":["Number"],"since":null,"text":"idc: Number - control's IDC"}],"returns":{"type":"Boolean","types":["Boolean"],"description":"true if the control is enabled, false if not","text":"Boolean - true if the control is enabled, false if not"},"form":"unary","operator":null,"left":null,"right":{"text":"idc","types":["Number"]}},{"syntax":"ctrlEnabled controlName","since":null,"effect":null,"exec":null,"params":[{"name":"controlName","type":"Control","optional":false,"default":null,"description":null,"types":["Control"],"since":null,"text":"controlName: Control"}],"returns":{"type":"Boolean","types":["Boolean"],"description":"true if the control is enabled, false if not","text":"Boolean - true if the control is enabled, false if not"},"form":"unary","operator":null,"left":null,"right":{"text":"controlName","types":["Control"]}}],"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};"]},{"text":"```sqf\n_enabled = ctrlEnabled _control;\n```","code":["_enabled = ctrlEnabled _control;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["ctrlEnable"],"notes":[],"categories":[]}