From RAD Studio API Documentation
Jump to: navigation, search


property Ancestor: TPersistent read FAncestor write FAncestor;


__property TPersistent* Ancestor = {read=FAncestor, write=FAncestor};


Type Visibility Source Unit Parent
property public
System.Classes TFiler


Determines whether to write the properties of inherited components.

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.

See Also