API Documentation > CorelDRAW > 2025-v26
TreeNode class
TreeNode class
Syntax:
Class TreeNode
Remarks:
The TreeNode class represents the settings for a tree node.
Properties:
Name Description
Children Returns a collection of all the child nodes in the document tree
Document Returns the document object this node resides in
FirstChild Returns the first child node in the document tree
Handle Returns a unique ID of the tree node
IsGroupChild Returns True if the node is inside a group
LastChild Returns the last child node in the document tree
Layer Returns the layer object this node resides on
Name Gets or sets the name property of the tree node
Next Returns the next sibling node in the document tree
NextSelected Returns the next selected node in the selection chain
Page Returns the page object this node resides on
Parent Returns the parent node in the document tree
Previous Returns the previous sibling node in the document tree
Selected Returns True if the node is selected in the document
Shape Returns the real document shape object this tree node represents
ShapeType Returns the type of the shape the shape tree node represents
Type Returns the type of the tree node
VirtualShape Returns a virtual shape object this node represents
Methods:
Name Description
Delete Destroys the node physically
GetCopy Creates a temporary copy of the node and all its properties
IsDescendentOf Returns True if the node is a direct or indirect child of the specified node
LinkAfter Inserts the node into the document tree after the specified node
LinkAsChildOf Inserts the node into the document tree as the first child of the specified node
LinkBefore Inserts the node into the document tree before the specified node
MoveAfter Moves the node after the specified node
MoveBefore Moves the node before the specified node
MoveToFirst Moves the node to the top of the sibling node list
MoveToLast Moves the node to the bottom of the sibling node list
SwapData Swaps all the tree node data between the two nodes
SwapGroupData Swaps all the children between the two group nodes
UnLink Removes the node from the document tree