[Lazarus] Inconsistent ScrolledClientRect calculation

Hans-Peter Diettrich DrDiettrich1 at aol.com
Fri Oct 7 16:09:59 CEST 2011

Mattias Gaertner schrieb:

>  > > ClientRect Left,Top is 0,0, so Right=ClientWidth and 
> Bottom=ClientHeight.
>  >
>  > Is this really consistent with a scrolled client area, inner borders,
>  > swapped scrollbars in BiDi mode etc.?
> I'm not sure what you mean with "inner borders".

See e.g. TControlBorderSpacing. A comment also mentions that group boxes 
have their frame inside their client area.

> The ClientRect excludes scrollbars and is relative to the left, top of 
> the visible client area (so Left,Top are almost always 0,0). So for 
> almost all uses it is simply the size of the visible area, where a 
> control can paint and gets mouse events.

A control can paint everything within its *bounds*, e.g. frames and 
bevels. The *client area* is reserved for child controls, as the name 


More information about the Lazarus mailing list