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

# TWinControl.GetClientRect

Gets the value for the ClientRect property.

## Declaration

Source position: controls.pp line 2285

`protected function TWinControl.GetClientRect: TRect; override;`

## Function result

Value for the ClientRect property.

## Description

GetClientRect is an overridden method in TWinControl used to get the value for the ClientRect property. ClientRect contains the visual client area for the control.

GetClientRect extends the inherited method to synchronize values in the control with its widgetset class instance using the Handle for the control. It uses values in ComponentState and the control flags for the TWinControl instance to determine the actions needed in the method. If an action cannot be determined, or the handle is not available, values in ClientWidth and ClientHeight are used as the Width and Height in the TRect instance.

## See also

TControl.GetClientRect |  | Gets the value for the ClientRect property.