TBaseVirtualTree.TotalCount Property

Virtual Tree View

Returns the number of nodes in the tree.

Pascal
property TotalCount: Cardinal;
Description

Use this property to get the overall number of nodes currently in the tree. This will validate all nodes in the control so that also not yet created child nodes are counted. 

 

Notes

This property is quite counter productive as it causes the entire tree to be validated when queried. This means that each 

node is initialized, including its children and grandchildren etc. creating so a full blown treeview (if not already 

done) which might keep much memory allocated (not counted the time necessary to validate all nodes). Therefore I 

discourage the use of the property unless it is really necessary.

Class
Links
What do you think about this topic? Send feedback!