dcsimg
Results 1 to 4 of 4

Thread: Save and Load Treeview with additional options

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2014
    Posts
    122

    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.

  2. #2
    Addicted Member Peter Porter's Avatar
    Join Date
    Jul 2013
    Posts
    241

    Re: Save and Load Treeview with additional options

    Quote Originally Posted by jpskiller View Post
    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.

  3. #3
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    102,607

    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.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Apr 2014
    Posts
    122

    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
  •  



Featured


Click Here to Expand Forum to Full Width