Save and Load Treeview with additional options
Hi,
I have found code that allows me to save and load a treeview to an xml file, but this just save and loads the node text, I would like the ability to also save the additional options. i.e. the icon attached (refrence to icon file) for the node and also the the information in the tag.
The tree view I have can have a couple of icons at different levels and also may have additional tet in the tag for referencing.
1 icon represents a folder and another to represent a file.
This is then used to load a file from a folder location when clicked, tag contains additinal information.
Re: Save and Load Treeview with additional options
Quote:
Originally Posted by
jpskiller
Hi,
I have found code that allows me to save and load a treeview to an xml file, but this just save and loads the node text, I would like the ability to also save the additional options. i.e. the icon attached (refrence to icon file) for the node and also the the information in the tag.
Jpskiller, how about you try to code it yourself first, and when you get stuck, show us what you got and we'll give ya a hand. :)
Re: Save and Load Treeview with additional options
I agree with Peter Porter but, at the very least, if you have existing code that does part of the job, why haven't you shown us that code? Why would we write something from scratch when all that's required is probably a very small modification to what you already have? If you understand what you already have then it should be fairly easy to save other property values as XML attributes in exactly the same way as you're already saving the Text property value. If you don't understand the code you already have then you should spend some time on that first. If there's something specific that you don't understand about it, asking about that first would be the better option. Using code you don't understand is sometimes unavoidable but always best avoided if possible.
Re: Save and Load Treeview with additional options
Cheers for the advice I have spent more time experimenting and believe I will be able to sort it now, won't be the most efficient method but I can get it working by modifying existing code to add additional XMLattibutes.