System.Classes.TFiler.Ancestor

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Ancestor: TPersistent read FAncestor write FAncestor;

C++

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

Properties

Type Visibility Source Unit Parent
property public
System.Classes.pas
System.Classes.hpp
System.Classes TFiler

Description

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