CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2011
    Posts
    14

    [RESOLVED] Read from one tree and overwrite another tree with the values

    I have two treeviews(TV1 and TV2) and need to sequential read each node label until I encounter a space in the label name. Then I need to write that value directly to the second tree in the same place.

    For example lets say the 4th node/line's label is TIRE CENTER. I want to read 'TIRE', then go to TV2 and in the 4th node/line I want to write 'TIRE'.

    So in order to do this, of course you would start at line one and read through to the end of the treeview.
    There are the same number of lines/nodes in each of the two Treeviews so it is just a one for one overwrite.

    Here is a print screen of exactly what the output would look like with a sample file. Don't try an make any sense of the names, or anything, this is generic example of what I am trying to do.

    Name:  treeview.png
Views: 1191
Size:  52.1 KB


    NOTE: I already nave TV1 and TV2, I just need to either create a TV3 or beter yet just update TV2 if possible.

    Can someone please show me a small snipit of code that would read TV1 and extract the label, and then write it to TV2 (or TV3)? I would be much appreciated.

    Thanks for your help
    KP

  2. #2
    Join Date
    Jul 2005
    Posts
    1,083

    Re: Read from one tree and overwrite another tree with the values

    Try attached sample project
    Attached Files Attached Files
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

  3. #3
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Read from one tree and overwrite another tree with the values

    Homework, again?
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  4. #4
    Join Date
    Jul 2005
    Posts
    1,083

    Re: Read from one tree and overwrite another tree with the values

    I don't think so... this guy has almost 2 months with the same problem in this and other forums
    Last edited by jggtz; February 27th, 2013 at 12:39 AM.
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

  5. #5
    Join Date
    Jun 2011
    Posts
    14

    Re: Read from one tree and overwrite another tree with the values

    exactly what I needed. Thanks...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured