[Lazarus] Why is TCustomControl.Canvas public?

Flávio Etrusco flavio.etrusco at gmail.com
Thu Jul 14 16:44:38 CEST 2011


On Thu, Jul 14, 2011 at 3:00 AM, Felipe Monteiro de Carvalho
<felipemonteiro.carvalho at gmail.com> wrote:
> 2011/7/14 Flávio Etrusco <flavio.etrusco at gmail.com>:
>> I guess you mean the current behavior is as it is for Delphi
>> compatibility, right?
>> I supposed so, but isn't it worth changing?
>
> No, there are many component sets which work with both the VCL and the
> LCL. Creating incompatibilities generates problems for component
> developers. Note that TCustomControl is a basic building block for
> component developers.
>
> Making things that are protected in Delphi public in Lazarus is not a
> problem, but the opposite is a big compatibility problem.
>
> --
> Felipe Monteiro de Carvalho
>

Accessing Canvas outside Paint in Windows isn't recommended, but
works. It doesn't on other platforms, and we've seen in the ML several
people falling in this trap, didn't we?

-Flávio




More information about the Lazarus mailing list