And for your problem you have
VirtualStringTree1.ChildCount[CurrentNode]
.
This property only fetches the appropriate value, because this value is already known, so there is no need for counting or anything. Faster is impossible.
It is fast, because it did not count all wanted nodes
Code:
+-n1
+-n2
+-n3
+-n4
+-n5
+-n6
Counting all nodes at level 1 should return 4 and not 2
Kaum macht man's richtig - schon funktioniert's
Zertifikat: Sir Rufo (Fingerprint: ea 0a 4c 14 0d b6 3a a4 c1 c5 b9
dc 90 9d f0 e9 de 13 da 60)