TTreeStorageCallback procedure type
Specifies a callback routine used to perform actions needed when a tree node is read from or written to an XML DOM node.
Declaration
TTreeStorageCallback = procedure(ATreeNode: TTreeNode;
ADomNode: TDomNode) of objectArguments
ATreeNode | TTreeNode instance used in the routine. |
ADomNode | TDOMNode instance used in the routine. |
Description
TTreeStorageCallback is an object procedure type which defines a
callback used to read or write a tree node to or from an XML DOM node.
TTreeStorageCallback allows arbitrary data in the specified tree or XML nodes
to be handled properly.
An example usage:
As a save callback, it can be used to convert / format / cast untyped content in the TTreeNode.Data property before it is stored to the specified tree node. As a load callback, the content in an XML node can be converted / formatted / cast before it is stored to the TTreeNode.Data property.
Routines using the TTreeStorageCallback signature are passed as an argument to TreeSaveToXML and TreeLoadFromXML routines. The callback routine is executed for each tree node processed in the tree view. The callback occurs after typed members in TTreeItemStorageOption for a given tree node have been read or written. An application must implement a routine using the signature to perform actions needed.
Added in LCL version 5.0.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
