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

# TWinControl.ControlCount

The number of child controls in the Controls property.

## Declaration

Source position: controls.pp line 2330

`public property TWinControl.ControlCount : Integer read GetControlCount;`

## Description

ControlCount is a read-only Integer property which contains the number of child controls stored in the indexed Controls property.

The value is updated when control instances are created using the current class instance as the Parent for the control. The value is used in the AlignControls method when the Controls are positioned, aligned, and resized. It is also used to determine whether additional actions are needed in methods like DoChildSizingChange, InvalidatePreferredChildSizes, DoAutoSize, and DoAllAutoSize.

## See also

TWinControl.Controls |  | Provides indexed access to the child controls for the class instance.
TWinControl.AlignControls |  | Repositions and resizes the control and child controls.