{"name":"cbSetChecked","operator":null,"title":"cbSetChecked","type":"command","url":"https://community.bistudio.com/wiki/cbSetChecked","revid":369236,"updated":"2024-09-03T10:35:01Z","groups":["GUI Control"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.12"}],"since":{"game":"arma3","name":"Arma 3","version":"1.12"},"arma3_since":"1.12","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Sets the current state of a CT_CHECKBOX control. Use `\"CheckedChanged\"` control event handler with it.","syntaxes":[{"syntax":"control cbSetChecked state","since":null,"effect":null,"exec":null,"params":[{"name":"control","type":"Control","optional":false,"default":null,"description":null,"types":["Control"],"since":null,"text":"control : Control"},{"name":"state","type":"Boolean","optional":false,"default":null,"description":null,"types":["Boolean"],"since":null,"text":"state : Boolean"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"control","types":["Control"]},"right":{"text":"state","types":["Boolean"]}}],"examples":[{"text":"```sqf\n_myCheckBox cbSetChecked true;\n```","code":["_myCheckBox cbSetChecked true;"]},{"text":"```sqf\n_disp = findDisplay 46 createDisplay \"RscDisplayEmpty\";\n_chk = _disp ctrlCreate [\"RscCheckBox\", -1];\n_chk cbSetChecked true;\n```","code":["_disp = findDisplay 46 createDisplay \"RscDisplayEmpty\";\n_chk = _disp ctrlCreate [\"RscCheckBox\", -1];\n_chk cbSetChecked true;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["cbChecked","ctrlSetChecked","ctrlChecked"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: GUI Control","Introduced with Arma 3 version 1.12","Scripting Commands"]}