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