Treeview

J

JJ

I need to rebuild/redraw a treeview, following some user actions on the
files/folders that the treeview is displaying (renaming or adding/deleting
folders/files).

When these actions take place I clear all nodes and rebuild the Treeview
nodes recursively. I want to redraw the treeview in exactly the same state
as the previous one - showing the previously selected node, the previously
expanded nodes, and each nodes pervious icon.

What method could I use to record these states? I can record the currently
selected node, but the expanded nodes are giving me a bit of a problem.
Treeviewcollection doesn't seem to record this sort of information. I could
record relevent information in an array (valuepath, node image, selected,
expanded) but I'd have to parse the nodes twice (once to find how many
nodes) in order to find the length of the required array.

There must a more efficient way of doing this?

JJ
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top