|
TBaseVirtualTree.CopyTo Method (PVirtualNode, PVirtualNode, TVTNodeAttachMode, Boolean)
Copies Source and all its child nodes to Target.
Pascal
function CopyTo(Source: PVirtualNode; Tree: TBaseVirtualTree; Mode: TVTNodeAttachMode; ChildrenOnly: Boolean): PVirtualNode; overload; function CopyTo(Source: PVirtualNode; Target: PVirtualNode; Mode: TVTNodeAttachMode; ChildrenOnly: Boolean): PVirtualNode; overload;
Description
Mode is used to specify further where to add the new node actually (as sibling of Target or as child of Target). Result is the newly created node to which source has been copied if ChildrenOnly is False or just contains Target in the other case. ChildrenOnly determines whether to copy also the source node or only its child nodes.
The variant taking a tree reference as target can be used to transfer nodes to a different tree, without determining its root node first. However one can also pass in any virtual tree node as target, as long as it belongs to a tree. The owning tree is automatically determined.
Class
Links
What do you think about this topic? Send feedback!
|