Table of Contents

TAdvCustomFormDesigner.ControlAtPos Method

Returns the control found at an specified position in the form.

Remarks

The method searches for a control belonging to a specified parent. This method is not recursive, which means that only direct children of the parent are searched.

Syntax

Unit: FormDesigner

function TAdvCustomFormDesigner.ControlAtPos(AParent: TWinControl; P: TPoint): TControl;

Parameters

<-> Parameter Type Description
AParent TWinControl Specifies the parent control containing the controls to be searched. The method will only look "inside" the specified parent, and will ignore other controls. If AParent is nil, the form being edited is used.
P TPoint The position in which the control will be searched. This value must be in parent's coordinates, (0, 0) being the the upper left of the specified control.

Returns

The control found at the specified position.

See also