Sign in Join
FPDoc Onlineexperiment

TWinControl.DoAutoSize procedure

Member of TWinControlprotectedIn unit Controls

Shrinks or enlarges the control to accommodate its children.

Declaration

pascal
procedure DoAutoSize; override

Description

Because this method is frequently overridden, the LCL calls the AdjustSize method instead; it checks whether DoAutoSize really should be called right now.

DoAutoSize performs the following:

  • Checks whether Autosize is permitted
  • Checks for unaligned child components and aligns them as best it can
  • Moves the constrained (aligned) child components to the correct position
  • Adjusts the size of the client rectangle
  • Adjusts the bounds of the whole control

See also

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