Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TTreeview persistence hazzard

Status
Not open for further replies.

vasker

Programmer
Jun 3, 2001
1
BD
I request help in finding the best method of persisting tree node data to a text file or an xml file. (I can handle the xml part.)
But how do I load nodes as saved in a file and save the changes made to the tree at run time to the file again, so that the changes are parmanetly stored in the file?
If my query is not very clear, I'll be obliged to be even more explicite if asked to.
 
How about saving with:
WriteComponentResFile('MyTreeView.txt', Treeview1);

and loading with:
ReadComponentResFile('MyTreeView.dfm', Treeview1);

Replace 'MyTreeView.dfm' with the filename of your choice. In Delphi 5, the data seems to be saved as text. I know erlier versions saved it in a binary/compressed format. Unfortunately, the node data itself is saved in a text representation of raw binary data, in hexidecimal, so maybe this is not the solution for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top