treeview - Delphi, VirtualStringTree - rebuilding tree, restoring state (expanded nodes) -


How can I restore the position of nodes in VirtualStringTree on tree reconstruction (which were expanded)?

My application uses VirtualStringTree (one of the best components ever!). Now, what do I need to do to rebuild the tree every time the application starts? In most cases though the "new" tree is the same as the last time created ... or at least very similar. What is the best way to restore the position of nodes? Whose expansions were expanded and so on ... I do not understand how to extend all the nodes manually all the time when I start the app ... and so my user, I believe. Unfortunately, due to privacy restrictions, I can not save any actual tree in a file and then load it, and compare the existing nodes when it is rebuilt (add / delete if necessary). I want some more way, please ...

Store only the topology of the tree, e.g. Indexed extended nodes for each level.

Alternatively, you can make a list of hashes for some unchanging nodes values ​​and can only have a hashed storage for expanded nodes in that list. This way you will protect the state, even though topology has changed, but at the cost of less privacy.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -