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

TWinControl.AlignControls

Repositions and resizes the control and child controls.

Declaration

Source position: controls.pp line 2167

protected procedure TWinControl.AlignControls(

  AControl: TControl;

  var RemainingClientRect: TRect

); virtual;

Arguments

AControl

  

Control examined and updated in the method.

RemainingClientRect

  

The available space, becomes remaining space on exit.

Description

AlignControls is a method used to reposition and resize the specified control and the children in its Controls property. This includes using the DockManager (when assigned and enabled) to reserve space for docked controls in the client rectangle. It uses settings in the Align, Anchor, BorderSpacing, ChildSizing, and Constraints properties to determine the actions needed in the method for each of the controls.

AlignControls checks and updates the windowed control flags prior to starting the operation. No actions are performed in the method when wcfAligningControls is already included in the control flags.

The ControlsAligned method is called when the method is completed, and the control flags are updated to remove the value wcfAligningControls.

AlignControls is called from the private AlignControl method after the client rectangle has been adjusted and the logical display area for the control has been determined. AlignControl is the boss; AlignControls performs the heavy lifting.

See also

TWinControl.Controls

  

Provides indexed access to the child controls for the class instance.

TWinControl.DoAdjustClientRectChange

  

Asks the widget if ClientRect has changed since the last AlignControl execution; calls AdjustSize on change.

TControl.DoAllAutoSize

  

Resizes and aligns the control and all of it children.

TWinControlFlag

  

State flags of TWinControl.


Version 3.2 Generated 2024-02-25 Home