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

# TControl.SetParentComponent

Sets the value in the Parent property when the new parent component is a TWinControl instance.

## Declaration

Source position: controls.pp line 1523

`protected procedure TControl.SetParentComponent(`
`NewParentComponent: TComponent`
`); override;`

## Arguments

`NewParentComponent` |  | New TWinControl instance used as the Parent for the control.

## Description

Implements the dynamic method inherited from TComponent. When NewParentComponent is derived from TWinControl, the SetParent method is called to re-parent, position, and resize the control.

## See also

TControl.SetParent |  | Sets the value for the Parent property.
TControl.Parent |  | The control within which the control is shown.
TComponent.GetParentComponent