{"name":"ctrlDelete","operator":null,"title":"ctrlDelete","type":"command","url":"https://community.bistudio.com/wiki/ctrlDelete","revid":337526,"updated":"2023-02-05T19:30:47Z","groups":["GUI Control"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.26"}],"since":{"game":"arma3","name":"Arma 3","version":"1.26"},"arma3_since":"1.26","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Deletes given control. The control has to be created either by script with ctrlCreate or to have `deletable` property in config set to 1. Use ctrlShow false and ctrlEnable false to disable controls that cannot be deleted. Returns Boolean indicating  whether the deletion was successful.\n\n> [!WARNING]\n> Using ctrlDelete in a UI eventhandler called by the to be deleted control will crash the game! This also happens when a controls group is deleted that contains the \"calling\" control.","syntaxes":[{"syntax":"ctrlDelete control","since":null,"effect":null,"exec":null,"params":[{"name":"control","type":"Control","optional":false,"default":null,"description":null,"types":["Control"],"since":null,"text":"control: Control"}],"returns":{"type":"Boolean","types":["Boolean"],"description":null,"text":"Boolean"},"form":"unary","operator":null,"left":null,"right":{"text":"control","types":["Control"]}}],"examples":[{"text":"```sqf\nctrlDelete ((findDisplay 20000) displayCtrl 20001);\n```","code":["ctrlDelete ((findDisplay 20000) displayCtrl 20001);"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["ctrlCreate","ctrlModel","ctrlSetModel","ctrlPosition","ctrlSetPosition","ctrlClassName","displayCtrl","ctrlModelScale","ctrlSetModelScale","ctrlModelDirAndUp","ctrlSetModelDirAndUp"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: GUI Control","Introduced with Arma 3 version 1.26","Scripting Commands"]}