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

# TControl.IsParentOf

Determines whether this control is a parent of AControl.

## Declaration

Source position: controls.pp line 1708

`public function TControl.IsParentOf(`
`AControl: TControl`
`):Boolean; virtual;`

## Arguments

`AControl` |  | The initial control examined in the parent control hierarchy.

## Function result

True if this control is a parent of AControl.

## Description

IsParentOf is a Boolean function used to determine if the current control instance is ultimately a parent of the control specified in AControl. No actions are performed in the method when AControl has not been assigned (Nil), and the return value is set to False.

IsParentOf visits each control in the Parent control hierarchy, and returns True if the current class instance (Self) is found in the tree. The return value is False if the current control instance is not found in the Parent control tree.

## See also

TControl.Parent |  | The control within which the control is shown.