Sign in Join
FPDoc Onlineexperiment

TTreeNodes.Assign procedure

Member of TTreeNodespublicIn unit ComCtrls

Implements object persistence for the tree node container.

Declaration

pascal
procedure Assign(Source: TPersistent); override

Arguments

Source

Persistent object with the values copied in the method.

Description

Assign is an overridden method in TTreeNodes used to copy values from the persistent object in Source to the current class instance. Assign ensures that the cache for the container is cleared prior to loading values from Source.

If Source is derived from TTreeNodes, the nodes in the container are cleared and recreated from the nodes in Source. Node information handled in the method includes:

  • ImageIndex
  • SelectedIndex
  • OverlayIndex
  • StateIndex
  • Height
  • Data pointer (depending on LCL version)
  • Count
  • Expanded
  • Text

If Source is not derived from TTreeNodes, the inherited method is called to perform object persistence.

If Source is Nil, an EConvertError exception is raised.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.