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

# TWinControl.CustomAlignPosition

Returns the aligned position for a custom-aligned child control, using the OnAlignPosition event handler.

## Declaration

Source position: controls.pp line 2160

`protected procedure TWinControl.CustomAlignPosition(`
`AControl: TControl;`
`var ANewLeft: Integer;`
`var ANewTop: Integer;`
`var ANewWidth: Integer;`
`var ANewHeight: Integer;`
`var AlignRect: TRect;`
`AlignInfo: TAlignInfo`
`); virtual;`

## Arguments

`AControl` |  | The control to be repositioned / resized.
`AlignRect` |  | The remaining client area, within which the control can be placed.
`AlignInfo` |  | Information about the current align process.

## Description

The derived coordinates take into account the anchoring for AControl.

The OnAlignPosition handler can update the coordinates as required.

## See also

TAlignInsertBeforeEvent |  | Type of an OnAlignInsertBefore handler.