Skip to main content

TdxCustomTreeView.ExpandTo(TdxTreeViewNode) Method

Expands all ancestor nodes of the specified tree node.

Declaration

procedure ExpandTo(ANode: TdxTreeViewNode);

Parameters

Name Type Description
ANode TdxTreeViewNode

A tree node.

Remarks

This procedure expands a branch up to the specified node if one or more of its ancestors are collapsed. If all ancestor nodes are expanded, an ExpandTo procedure call has no effect.

Note

Do not call the ExpandTo procedure to display a specific node; call the MakeVisible procedure instead.

Example

The following example describes how to expand all ancestor nodes of a specific node in the Tree View.

The image below illustrates the tvcFolders Tree View control:

Tree View Example

The “Help Files” folder contains the “ExpressQuantumGrid” folder with the “EQ4.hlp” file in it.

The following code expands the “Help Files” and “ExpressQuantumGrid” folders (expands all ancestor nodes of the “EQ4.hlp” node whose index is 4):

tvcFolders.ExpandTo(tvcFolders.Items[4]);

Expanded Folders

See Also