Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to auto expand all TTreeView nodes?

I want to expand tree on main form when application starts. How i can do it? I cant find corresponding property. C++ builder 2009.

like image 594
Funtime Avatar asked Apr 10 '11 15:04

Funtime


People also ask

How do you expand node in TreeView?

Use TreeNode. Expand() on every node from the root to the leaf you wanted to be expanded, using Expand on the leaf node or the node you want to expand make only the node itself to show its subchildren.

How many root nodes can a TreeView control have?

A typical tree structure has only one root node; however, you can add multiple root nodes to the TreeView control. The Nodes property can also be used to manage the root nodes in the tree programmatically. You can add, insert, remove, and retrieve TreeNode objects from the collection.


1 Answers

You simply need to call FullExpand() on the tree view.

like image 100
David Heffernan Avatar answered Oct 24 '22 21:10

David Heffernan