Hans-Peter Diettrich <[email protected]> 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
> > <[email protected]> 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 
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to