On 13/7/2011 05:42, Flávio Etrusco wrote:
Hello,
Wouldn't it better to make Canvas protected and pass it on the OnPaint event?
Yes. It seems a Delphi compatible design
I'm almost sure is was also public in Delphi,
Yes it is.
and I don't even
remember Delphi having OnPaint in TCustomControl,
Yes Delphi does not has.
IMHO it does not makes sense since TCustomControl is not supposed to be
used directly. It's supposed to be derived and override Paint. The same
for SetColor. Color should not be public so not handled by default in
TCustomControl.
but...
BTW why is OnPaint called inside TCustomControl.Paint instead of
TCustomControl.PaintWindow?
PaintWindow -> Paint -> OnPaint
Luiz
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus