flavo
asked on
Treeview -> Count fellow children
I know we can return the number of fellow children with
node.parent.children
But I need to count the first level of children
Example of treeview
Dad
- son
- something
Mum
- Daughter
- something
So if i click Dad, i want to return 2
Cheers!
Dave :-)
node.parent.children
But I need to count the first level of children
Example of treeview
Dad
- son
- something
Mum
- Daughter
- something
So if i click Dad, i want to return 2
Cheers!
Dave :-)
Dave? You answering your own questions agani...?
:-)
:-)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The Q's I ask are just tooo easy....
I was hoping for a property or something... oh well...
Dave :-)
I was hoping for a property or something... oh well...
Dave :-)
ASKER
http://www.codecomments.com/archive337-2005-1-374282.html
<CODE>
Dim nodX As Node
Dim lChildNodeCount As Long
For Each nodX In TreeView1.Nodes
If Not nodX.Parent Is Nothing Then
lChildNodeCount = lChildNodeCount + 1
End If
Next
</CODE>