Vcl.Controls.TControl.ClientRect
Delphi
property ClientRect: TRect read GetClientRect;
C++
__property System::Types::TRect ClientRect = {read=GetClientRect};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | Vcl.Controls.pas Vcl.Controls.hpp |
Vcl.Controls | TControl |
Description
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