-
Jun 6th, 2018, 04:58 PM
#1
Thread Starter
Lively Member
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.
-
Jun 6th, 2018, 05:14 PM
#2
Re: Save and Load Treeview with additional options
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.
Last edited by Peter Porter; Jun 6th, 2018 at 05:24 PM.
-
Jun 6th, 2018, 07:58 PM
#3
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.
-
Jun 7th, 2018, 03:10 PM
#4
Thread Starter
Lively Member
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.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|