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
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