[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Contains data for an item displayed in a TTreeView control.
Source position: comctrls.pp line 2967
type TTreeNode = class(TPersistent) |
||
protected |
||
procedure Changed(); |
|
Performs a change notification for the node with the specified reason. |
function GetOwner; override; |
|
Gets the owner of the object instance. |
public |
||
constructor Create(); virtual; |
|
Constructor for the class instance. |
destructor Destroy; override; |
|
Destructor for the class instance. |
function AlphaSort; |
|
Sorts the top-level child nodes in Items. |
function Bottom; |
|
Gets the vertical coordinate for the bottom of the tree node. |
function BottomExpanded; |
|
Gets the bottom coordinate for the last visible, expanded child node in the subtree. |
function CustomSort(); |
|
CustomSort - Sorts the child nodes using SortProc. |
function DefaultTreeViewSort(); |
|
DefaultTreeViewSort - returns result of string comparison between names of Node1 and Node2 |
function DisplayExpandSignLeft; |
|
DisplayExpandSignLeft - returns the position of the left edge of the expand / collapse indicator. |
function DisplayExpandSignRect; |
|
DisplayExpandSignRect - returns the coordinates of the rectangle within which the expand sign are displayed. |
function DisplayExpandSignRight; |
|
DisplayExpandSignRight - returns the position of the right edge of the expand sign (i.e. takes into account the width of the icon etc). |
function DisplayIconLeft; |
|
DisplayIconLeft - returns the position of the actual icon for the expand sign (usually 1 pixel greater than DisplayExpandSignLeft). |
function DisplayRect(); |
|
DisplayRect - returns the coordinates of the rectangle containing the current entry; if TextOnly is True, returns the coordinates for the text. |
function DisplayStateIconLeft; |
|
DisplayStateIconLeft - returns the position of the State Icon. |
function DisplayTextLeft; |
|
DisplayTextLeft - returns the position of the left edge of the text. |
function DisplayTextRight; |
|
DisplayTextRight - returns the position of the right edge of the text. |
function EditText; |
|
Edits the text for the node in the associated TreeView control. |
function FindNode(); |
|
Gets the child node in Items with the specified text. |
function GetFirstChild; |
|
Gets the first child node in the Items property. |
function GetFirstSibling; |
|
Gets the first tree node at the same level in the tree. |
function GetFirstVisibleChild; |
|
Gets the tree node that is the first visible child node in the subtree. |
function GetHandle; |
|
Gets the value for the Handle property. |
function GetLastChild; |
|
Gets the last node that is a top-level child node in the subtree. |
function GetLastSibling; |
|
Gets the last node at the same level as the current node. |
function GetLastSubChild; |
|
GetLastSubChild - returns the last sub-child node of this parent. |
function GetLastVisibleChild; |
|
Gets the last child node in Items with its Visible property set to True. |
function GetNext; |
|
Gets the next node in the tree. |
function GetNextChild(); |
|
GetNextChild - returns the next child node of the parent specified by AValue. |
function GetNextExpanded; |
|
GetNextExpanded - returns the next expanded node. |
function GetNextMultiSelected; |
|
GetNextMultiSelected - returns the next node in a multi-selection. |
function GetNextSibling; |
|
GetNextSibling - returns the next node in the same level as the current node. |
function GetNextSkipChildren; |
|
Gets the next sibling node for the current tree node, or Nil when a sibling does not exist. |
function GetNextVisible; |
|
Gets the next visible node. |
function GetNextVisibleSibling; |
|
Gets the next visible node at the same level in the tree. |
function GetParentNodeOfAbsoluteLevel(); |
|
GetParentNodeOfAbsoluteLevel - returns the parent of all nodes at this absolute level. |
function GetPrev; |
|
Gets the previous node in the tree. |
function GetPrevChild(); |
|
Gets the previous child node starting at the specified child node. |
function GetPrevExpanded; |
|
GetPrevExpanded - returns the previous expanded node. |
function GetPrevMultiSelected; |
|
GetPrevMultiSelected - returns the previous node in a multi-selection. |
function GetPrevSibling; |
|
GetPrevSibling - returns the previous node in the same level as the current node. |
function GetPrevVisible; |
|
GetPrevVisible - returns the previous visible (not hidden) node. |
function GetPrevVisibleSibling; |
|
Gets the previous visible sibling tree node for the current node. |
function GetTextPath; |
|
GetTextPath - returns a string containing the path to the current node delimited by slash. |
function HasAsParent(); |
|
HasAsParent - returns True if the node specified by AValue has a parent node. |
function IndexOf(); |
|
Get the index position for the specified child tree node. |
function IndexOfText(); |
|
IndexOfText - returns the index of the node containing the specified Text string. |
procedure Assign(); override; |
|
Assign - if Source is of correct type, copies details directly, otherwise calls inherited Assign which probably raises an exception. |
procedure Collapse(); |
|
Collapses the current tree node, and optionally collapses any descendent nodes. |
procedure ConsistencyCheck; |
|
ConsistencyCheck - makes sure all references to and from the node are consistent. |
procedure Delete; |
|
Frees the current tree node when the Deleting property is not True. |
procedure DeleteChildren; |
|
DeleteChildren - remove the descendent Nodes in the tree structure. |
procedure EndEdit(); |
|
Ends editing of the tree node in the associated tree view control. |
procedure Expand(); |
|
Expands the current tree node, and optionally all descendent nodes. |
procedure ExpandParents; |
|
Expands any tree node which is an ancestor of the current node. |
procedure FreeAllNodeData; |
|
Frees the Pointer in Data, including any child nodes in Items. |
procedure MakeVisible; |
|
Forces the node tree node to become visible. |
procedure MoveTo(); virtual; |
|
MoveTo - method for relocating a node to the specified Destination using the specified mode of attachment. |
procedure MultiSelectGroup; |
|
MultiSelectGroup - method for multi-selecting a group of nodes. |
procedure Update; |
|
Redraws the associated TreeView control if an update is not already in progress. |
procedure WriteDebugReport(); |
|
WriteDebugReport - for debugging. If Recurse is True, report for all descendants as well. |
property AbsoluteIndex: Integer; [r] |
|
AbsoluteIndex - the absolute index of the current node, i.e. without taking into account the level of ancestry. |
property Count: Integer; [r] |
|
The number of nodes where the current node is the parent node. |
property Cut: Boolean; [rw] |
|
Indicates if the tree node has been cut from the tree structure. |
property Data: Pointer; [rw] |
|
Pointer to the custom data for the node. |
property Deleting: Boolean; [r] |
|
True if the node has been marked for deletion in the associated tree view control. |
property DropTarget: Boolean; [rw] |
|
True if the node is a drop target in a drag and drop operation. |
property Expanded: Boolean; [rw] |
|
True if the node has been expanded, False when collapsed. |
property Focused: Boolean; [rw] |
|
True if the node has focus in the TreeView control. |
property Handle: PtrUInt; [r] |
|
Handle for the tree view control which owns the TreeNodes container and the tree node. |
property HasChildren: Boolean; [rw] |
|
Indicates whether the tree node has child nodes. |
property Height: Integer; [rw] |
|
The height for the node including its text, images, and indicators. |
property ImageIndex: Integer; [rw] |
|
Ordinal position for the image displayed for the node, or -1 when no image is assigned. |
property Index: Integer; [rw] |
|
Ordinal position for the node in its parent node. |
property IsFullHeightVisible: Boolean; [r] |
|
True if the entire node is visible in the display area for the associated TreeView control. |
property IsVisible: Boolean; [r] |
|
True if the node is visible. |
|
Provides indexed access to the child nodes for the current node. |
|
property Level: Integer; [r] |
|
The number of ancestor nodes for the current tree node. |
property MultiSelected: Boolean; [rw] |
|
MultiSelected - if True, several nodes have been selected simultaneously (e.g. using the Shift or Ctrl key while selecting). |
property NodeEffect: TGraphicsDrawEffect; [rw] |
|
Graphic drawing effect applied to the node in the associated TreeView control. |
property OverlayIndex: Integer; [rw] |
|
Ordinal position for the overlay image used for the node. |
property Owner: TTreeNodes; [r] |
|
Owner of the tree node instance. |
|
Parent node for the current tree node. |
|
property Selected: Boolean; [rw] |
|
True if the current node is selected in the tree view control. |
property SelectedIndex: Integer; [rw] |
|
Ordinal position for the image displayed when the tree node is Selected. |
property StateIndex: Integer; [rw] |
|
StateIndex the index of the state (within an enumerated type). |
property States: TNodeStates; [r] |
|
Contains active state flags for the tree node. |
property SubTreeCount: Integer; [r] |
|
The number of subtrees in the ancestor nodes for the class instance. |
property Text: string; [rw] |
|
Text displayed for the tree node. |
property Top: Integer; [r] |
|
Vertical coordinate for the top of the tree node. |
property TreeNodes: TTreeNodes; [r] |
|
The container where the tree node is stored, and the owner of the class instance. |
property TreeView: TCustomTreeView; [r] |
|
The tree view control where the node is displayed. |
property Visible: Boolean; [rw] |
|
True if the tree node is visible in the associated TreeView control. |
end; |
|
Contains data for an item displayed in a TTreeView control. |
|
| | ||
TObject |
A TTreeNode is part of a TTreeView and is used to store the data displayed in the control. This can be done by using the Text property or for more complex data the Data property can be used. Each node can have sibling or child items associated with it.
|
How to use StdCtrls, ComCtrls or ExtCtrls. |