RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TFiler.Ancestor Property

Determines whether to write the properties of inherited components.

Pascal
property Ancestor: TPersistent;
C++
__property TPersistent * Ancestor;

Do not use Ancestor directly. It is used internally by the methods of writer objects to write components in inherited forms. 

In Visual Form Inheritance, a writer object only needs to write the values of properties that differ from those that are inherited. It tracks each component from which properties can be inherited in Ancestor and compares properties before writing. If Ancestor is nil (Delphi) or NULL (C++), there is no corresponding component from which to inherit, and the writer object writes the component out to the stream completely. 

Ancestor is only non-nil (Delphi) or non-NULL (C++) when writing forms created with Visual Form Inheritance. The streaming system uses WriteDescendent and WriteDescendentRes to write such forms to the stream.  

When writing or overriding a DefineProperties method, be aware that Ancestor might be set, and it might be necessary to write or omit properties, as appropriate. Normally, DefineProperty read procedures ignore the value of Ancestor. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!