[Lazarus] Inconsistent ScrolledClientRect calculation

Hans-Peter Diettrich DrDiettrich1 at aol.com
Fri Oct 7 13:18:23 CEST 2011


Mattias Gaertner schrieb:

>  > > Where exactly is TRect used to hold the Width and Height? File and 
> Line.
>  >
>  > TControl.GetClientRect
>  > (controls.inc 1525..)
>  >
>  > BoundsRect and ClientRect contain different information, despite the
>  > similar name and type.
> 
>  
> 
> They both return a Left,Top,Right,Bottom.
> 
> 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.?

But I agree that client areas *could* be described by TopLeft and 
BottomRight points, when the implementation is consistent.
AFAIR there exist (derived) controls with a client origin <> (0,0)...

DoDi





More information about the Lazarus mailing list