[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Forms' (#lcl)

TCustomForm.SetParent

Sets the value for the Parent property.

Declaration

Source position: forms.pp line 668

protected procedure TCustomForm.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

TControl.Parent

  

The control within which the control is shown.

TControl.SetParent

  

Sets the value for the Parent property.


Version 3.2 Generated 2024-02-25 Home