Sign in Join
FPDoc Onlineexperiment

TCustomFlowPanel.AlignControls procedure

Member of TCustomFlowPanelprotectedIn unit ExtCtrls

Performs layout and alignment for flowed controls on the panel.

Declaration

pascal
procedure 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.

AlignControls does not call the inherited method.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.