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

# TWinControl.AutoSizePhases

Translates control state flags into AutoSizePhases.

## Declaration

Source position: controls.pp line 2364

`public function TWinControl.AutoSizePhases: TControlAutoSizePhases; override;`

## Function result

Set withe auto-size phase values enabled for the control.

## Description

The return value is a TControlAutoSizePhases set type. It is populated with values from the TControlAutoSizePhase enumeration based on window control flags and other internal members in the class instance. When Parent has been assigned, the values are derived by calling AutoSizePhases in Parent.

AutoSizePhases is called from methods like DoAutoSize and UpdateShowing. It is also called from window message handlers like WMMove, WMSize, and WMWindowPosChanged.

## See also

TWinControl.DoAutoSize |  | Shrinks or enlarges the control to accommodate its children.
TWinControl.UpdateShowing |  | Updates the Showing property with the visibility for the control, its Parents, and its child controls.
TWinControl.WMMove |  | Handler for widget moved message; updates the Bounds.
TWinControl.WMSize |  | Event handler for size messages.
TWinControl.WMWindowPosChanged |  | Event handler for size/move messages.
TControl.Parent |  | The control within which the control is shown.
TControlAutoSizePhases |  | Set type used to store values from the TControlAutoSizePhase enumeration.
TControlAutoSizePhase |  | Represents AutoSizing phases for controls.