[Lazarus] Inconsistent ScrolledClientRect calculation
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Fri Oct 7 11:52:04 CEST 2011
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.
A similar problem exists with mouse coordinates, which can be either
screen or client coords.
DoDi
More information about the Lazarus
mailing list