{"name":"ctrlDelete","title":"ctrlDelete","type":"command","url":"https://community.bistudio.com/wiki/ctrlDelete","revid":337526,"updated":"2023-02-05T19:30:47Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"1.26"},"since":"arma3 1.26","arma3_since":"1.26","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","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["ctrlDelete ((findDisplay 20000) displayCtrl 20001);"]}],"see_also":["ctrlCreate","ctrlModel","ctrlSetModel","ctrlPosition","ctrlSetPosition","ctrlClassName","displayCtrl","ctrlModelScale","ctrlSetModelScale","ctrlModelDirAndUp","ctrlSetModelDirAndUp"]}