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

# FindControlAtPosition

Gets the control at the specified screen position.

## Declaration

Source position: controls.pp line 2731

`function FindControlAtPosition(`
`const Position: TPoint;`
`AllowDisabled: Boolean`
`):TControl;`

## Arguments

`Position` |  | The screen position examined in the routine.
`AllowDisabled` |  | Finds disabled controls when True.

## Function result

The control found at the specified Position; Nil when not found.

## Description

FindControlAtPosition is a TControl function used to get the control at the specified screen position. When AllowDisabled is True, a disabled control can also be located in the routine. In the current implementation, AllowDisabled is ignored (assumed to be True). First a window at the given screen position is searched, then a control within it.

## See also

TControl |  | The base class for visible controls.
FindLCLWindow |  | Find the window and its owning control at the given screen coordinates.
TWinControl.ControlAtPos |  | Get the child control at the given client position.
TControlAtPosFlag |  | Flags for finding a control at a given (client) position.