Sign in Join
FPDoc Onlineexperiment

TApplication.ControlDestroyed procedure

Member of TApplicationpublicIn unit Forms

Clears all references to the destroyed control.

Declaration

pascal
procedure ControlDestroyed(AControl: TControl)

Arguments

AControl

Control instance which is being freed.

Description

ControlDestroyed is a method used to update the application when the control in AControl is freed. ControlDestroyed ensures that any property in the application that contains a reference to AControl is set to Nil, including:

  • MainForm
  • MouseControl
  • HintControl
  • CreatingForm (internal)

Properties in the Screen singleton are also updated to remove any references to AControl, including:

  • ActiveControl
  • ActiveCustomForm
  • ActiveForm
  • FocusedForm

The UpdateLastActive method in Screen is called to perform change notification for the forms and / or controls.

ControlDestroyed is called from the Destroy method in TControl.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.