Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21096

Levels within a Treeview and how many Children in lowest level

$
0
0
Hello,
I have a treeview control called TREEVIEW1.

I need to get several statistics out of the control.

Example
1
-1.1
-1.2
-1.3
2
-2.1
-2.2
-2.3
3
-3.1
-3.2
-3.3
4
-4.1
-4.2
-4.3

Assumptions:
Each parent will have the same number of children.

1. How can I get the number of levels? In this example it is 2. If it had
1
-1.1
-1.1.1
-1.1.1.1
2
-2.1
etc.
the answer would be 4

2. How can I get the number of children of the lowest level. In this example it is 3 (1.1, 1.2, 1.3 or 4.1, 4.2, 4.3) this is because the assumption is all parents have the same number of children.
3. How can I determine, when a key is pressed the level that is highlighted?

Thanks in advance.....
k

Viewing all articles
Browse latest Browse all 21096

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>