From RAD Studio API Documentation
Jump to: navigation, search


property ClientRect: TRect read GetClientRect;


__property System::Types::TRect ClientRect = {read=GetClientRect};


Type Visibility Source Unit Parent
property public
Vcl.Controls TControl


Specifies the size of a control's client area in pixels.

Read ClientRect to find out the size of the client area of a control. ClientRect returns a rectangle with its Top and Left fields set to zero, and its Bottom and Right fields set to the control's Height and Width, respectively. ClientRect is equivalent to Rect(0, 0, ClientWidth, ClientHeight).

A point is considered within the control's client rectangle if it lies on the left or top side but not if it lies on the right or bottom side. That is, to be inside the client rectangle, the X-coordinate must be greater than or equal to ClientRect.Left and less than ClientRect.Right, and the Y-coordinate must be greater than or equal to ClientRect.Top and less than ClientRect.Bottom.

Note: ClientRect is the size of the physical client area of the control, not its logical client area. If the control supports scrolling, the ClientRect is not the entire scrolling range, but only the region that is available at any given time.

See Also

Code Examples