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

# TWinControl.ControlAtPos

Get the child control at the given client position.

## Declaration

Source position: controls.pp line 2372

`public function TWinControl.ControlAtPos(`
`const Pos: TPoint;`
`AllowDisabled: Boolean`
`):TControl; function TWinControl.ControlAtPos(`
`const Pos: TPoint;`
`AllowDisabled: Boolean;`
`AllowWinControls: Boolean`
`):TControl; function TWinControl.ControlAtPos(`
`const Pos: TPoint;`
`Flags: TControlAtPosFlags`
`):TControl; virtual;`

## Arguments

`Pos` |  | The client coordinates.
`AllowDisabled` |  | Allow finding disabled controls.

## Function result

The found control, Nil if none found.

## Arguments

`Pos` |  | The client coordinates.
`AllowDisabled` |  | Allow finding disabled controls.
`AllowWinControls` |  | Allow finding TWinControls, in addition to TControls.

## Arguments

`Pos` |  | The client coordinates.
`Flags` |  | Encoded Allow... conditions.

## Description

WinControls are found before Controls (if overlapping).