[Lazarus] Hook TComponent streaming system

Michael Van Canneyt michael at freepascal.org
Sat May 22 20:05:55 CEST 2010



On Sat, 22 May 2010, Luiz Americo Pereira Camara wrote:

> I'd like to set some properties of a TComponent(TForm) through RTTI before 
> TComponent.Loaded is called.
>
> After a call to TMyForm.Create, the component is initiated through the 
> streaming system that calls Loaded.
>
> Is there a way to hook this streaming system so i can change the properties 
> before the call to Loaded?

You can use defineproperties for that. You can simply override it in  your
form and set whatever properties you want. An alternative is overriding
'Loading', which is called at the start.

Michael.




More information about the Lazarus mailing list