Sign in Join
FPDoc Onlineexperiment

TCustomForm.SetParent procedure

Member of TCustomFormprotectedIn unit Forms

Sets the value for the Parent property.

Declaration

pascal
procedure SetParent(NewParent: TWinControl); override

Arguments

NewParent

New value for the property.

Description

SetParent is an overridden method in TCustomForm used to set the value for the Parent property.

SetParent disables auto-sizing before updating the property value. The Handle for the form is destroyed and re-created when Parent is both assigned and Visible.

SetParent ensures that the PixelsPerInch settings for the form instance and its Parent are the same. AutoAdjustLayout is called when the values differ and Scaled has been enabled for both the Parent form and the Application.

SetParent re-enables auto-sizing prior to exiting from the method.

See also

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