[Lazarus] 0019723: Implement TControl.InvalidateRect?

Martin lazarus at mfriebe.de
Fri Jul 15 22:54:40 CEST 2011


On 15/07/2011 20:33, Flávio Etrusco wrote:
> 2011/7/15 Martin<lazarus at mfriebe.de>:
>> http://bugs.freepascal.org/view.php?id=19723
>>
>> It would be nice to have TControl.InvalidateRect, so that component
>> developers can avoid calls to LCLIntf.InvalidateRect :-)
....
> The intended use is for component developers, yes. But actually I
> thought about it while checking a bug report and having to offset for
> InvalidateRect with a TPaintBox, so I'd prefer it was implemented in
> TControl ;-) It's just a matter of extract the method from
> TContol.Invalidate.

BTW, you realize, that if your intend is to minimize the invalidated 
rectangle, to what needs to be redrawn, then a TGraphicControl (or any 
none TWinControl) is not your best choice anyway?

At least on windows, but maybe others, if you put to TGrapicControl onto 
the same TWincontrol, and then you invalidate a one pixel rectangle in 
each of them, then this will invalidate ONE BIG rectangle containing 
both pixels.

So the point of having/using InvalidateRect for a none TWinControl is 
rather limited.




More information about the Lazarus mailing list