February 26th, 2013, 02:32 AM
[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.
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
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!