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

# TCustomFlowPanel.AlignControls

Performs layout and alignment for flowed controls on the panel.

## Declaration

Source position: extctrls.pp line 1322

`protected procedure TCustomFlowPanel.AlignControls(`
`AControl: TControl;`
`var RemainingClientRect: TRect`
`); override;`

## Arguments

`AControl` |  | Control with the child controls aligned in the method.
`RemainingClientRect` |  | Unused client area where the child controls are aligned.

## Description

AlignControls is an overridden procedure used to perform layout and alignment for flowed controls which are a child of the control specified in AControl. RemainingClientRect contains the unused client area where the controls are positioned and aligned.

No actions are performed in the method if child controls do not exist for the panel (ControlCount is 0).

AlignControls ensures space is reserved in the client rectangle for the borders on the panel. The value in FlowStyle determines the position in RemainingClientRect where alignment and layout for the controls is started. Each of the controls in ControlList is visited to adjust the client rectangle for the TControl instances based on the FlowStyle for the panel. SetBounds is called for the TControl instances to reposition / resize the control.

Remark: | AlignControls does not call the inherited method.

## See also

TWinControl.AlignControls |  | Repositions and resizes the control and child controls.