{"name":"ctrlChecked","operator":null,"title":"ctrlChecked","type":"command","url":"https://community.bistudio.com/wiki/ctrlChecked","revid":353343,"updated":"2024-03-15T17:11:52Z","groups":["GUI Control"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma3","name":"Arma 3","version":"0.50"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns the current state of given CT_CHECKBOXES control. Since Arma 3 v1.72 it is possible to query multiple checkboxes by providing checkbox index. For more information see CT_CHECKBOXES.\n\n> [!NOTE]\n> The `\"CheckBoxesSelChanged\"` control EH returns the control, index of changed checkbox and its current checked state. The checked state however is not a Boolean but Number 0 or 1. To convert ctrlChecked command output into number as well, use parseNumber command","syntaxes":[{"syntax":"ctrlChecked control","since":null,"effect":null,"exec":null,"params":[{"name":"control","type":"Control","optional":false,"default":null,"description":"CT_CHECKBOXES control. If control contain multiple checkboxes, only checkbox with index 0 is queried.","types":["Control"],"since":null,"text":"control: Control - CT_CHECKBOXES control. If control contain multiple checkboxes, only checkbox with index 0 is queried."}],"returns":{"type":"Boolean","types":["Boolean"],"description":"true checked, false unchecked","text":"Boolean - true checked, false unchecked"},"form":"unary","operator":null,"left":null,"right":{"text":"control","types":["Control"]}},{"syntax":"control ctrlChecked index","since":"arma3 1.72","effect":null,"exec":null,"params":[{"name":"control","type":"Control","optional":false,"default":null,"description":"CT_CHECKBOXES control","types":["Control"],"since":null,"text":"control: Control - CT_CHECKBOXES control"},{"name":"index","type":"Number","optional":false,"default":null,"description":"checkbox index","types":["Number"],"since":null,"text":"index: Number - checkbox index"}],"returns":{"type":"Boolean","types":["Boolean"],"description":"true checked, false unchecked","text":"Boolean - true checked, false unchecked"},"form":"binary","operator":null,"left":{"text":"control","types":["Control"]},"right":{"text":"index","types":["Number"]}}],"examples":[{"text":"```sqf\nctrlChecked _control;\n```","code":["ctrlChecked _control;"]},{"text":"```sqf\n_control ctrlChecked 3;\n```","code":["_control ctrlChecked 3;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["ctrlSetChecked","cbChecked","cbSetChecked"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: GUI Control","Introduced with Arma 3 version 0.50","Scripting Commands"]}