TreeView and read level

B

black_sun

Hi,
I have a problemand I ask your help.
I have a treeview with N levels. I want to get the name of the nodes
of the same level...that means I want in an array all the nodes at the
level0, then level 1 and so on...
Do you now how can I do this?

Thanks in advance.

Bye
BlackSun
 
C

Cor Ligthert[MVP]

A little bit difficult in my idea, because those arrays are not by
definition unique.

Cor
 
P

Phill W.

I have a treeview with N levels. I want to get the name of the nodes
of the same level...that means I want in an array all the nodes at the
level0, then level 1 and so on...

To what end?
Even assuming you can get this information, what is it going to /tell/ you?

Anyway ...

Root Nodes (Level 0) you can get easily enough. Just iterate directly
through [<treeview>].Nodes.

All the other Nodes in the tree exist only in the Nodes collection of
their immediate parent Node. There's no easy way to iterate through
/every/ Node in the tree any more (you'll probably have to hold them in
a duplicate, external collection).

Regards,
Phill W.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top