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.
Warning
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.
Syntax
ctrlDelete control
Parameters:
control: Control
Returns: Boolean
Examples
Example 1
ctrlDelete ((findDisplay 20000) displayCtrl 20001);
See also
ctrlCreate · ctrlModel · ctrlSetModel · ctrlPosition · ctrlSetPosition · ctrlClassName · displayCtrl · ctrlModelScale · ctrlSetModelScale · ctrlModelDirAndUp · ctrlSetModelDirAndUp