[Lazarus] 0019723: Implement TControl.InvalidateRect?

Flávio Etrusco flavio.etrusco at gmail.com
Fri Jul 15 21:33:19 CEST 2011


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 :-)
>
> ---
>
> Zeljan Rikalo (developer)  Not problem with implementing that, but one can
> say we can implement almost all winapi functions into TControl to avoid
> LCLIntf usage.
> I'm not against adding InvalidateRect(R: TRect) into TControl, but there
> must be
> agreement from other devels about it
>
> There is the question of drawing a lie, to how much to put on TWinControl.
> There are more Handle related functions... So there could be an additional
> HandleObject property, with an object representing the handle.
> Though, IMHO that would be too much...
>
>
> What is the specific use case for it?
> I can only really see use, if you develop your own component. But then you
> can add it there...
>
> --

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.
I guess it's impossible to draw line, they need to be indeed discussed
on a case-by-case basis. That's why I posted the RFE as a question ;-)

Best regards,
Flávio




More information about the Lazarus mailing list