[Lazarus] Inconsistent ScrolledClientRect calculation

Mattias Gaertner nc-gaertnma at netcologne.de
Fri Oct 7 11:10:57 CEST 2011


 


Hans-Peter Diettrich <DrDiettrich1 at aol.com> hat am 7. Oktober 2011 um 11:52
geschrieben:

> Felipe Monteiro de Carvalho schrieb:
> > On Fri, Oct 7, 2011 at 6:34 AM, Hans-Peter Diettrich
> > <DrDiettrich1 at aol.com> wrote:
> >> The ambiguous use of TRect, with either BottomRight or WidthHeight in the
> >> second TPoint, often leads to misunderstandings and flawed code (as above).
> >> It were helpful when type alias would be introduced and used, or when the
> >> argument names would indicate the current content of an TRect.
> >
> > 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. 
 

 
> A similar problem exists with mouse coordinates, which can be either
> screen or client coords. 
 
Mattias 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20111007/97960a3f/attachment-0003.html>


More information about the Lazarus mailing list