[Lazarus] Own component - problem with default published property

Alexander Klenin klenin at gmail.com
Fri May 18 13:40:51 CEST 2012

On Wed, May 16, 2012 at 5:13 PM, cobines <cobines at gmail.com> wrote:
> 2012/5/16 Krzysztof <dibo20 at wp.pl>:
>> Or must I create new descendant of TMyProperty for each control and
>> then change default value of SomeValue property?
> Yes, I think you have to do this. If you want to have different
> defaults for the property then you need to make different classes for
> them.

Yes, this is somewhat annoying. In TAChart I tried to reduce the
amount of extra code
by setting the default value in the ancestor class based on RTTI.
This way you need not override constructors of descendant properties.

Alexander S. Klenin

More information about the Lazarus mailing list