Board index » cppbuilder » Copy treeview layout

Copy treeview layout


2003-11-09 05:06:18 AM
cppbuilder85
How do you copy the layout of a treeview into another treeview?
Thanks.
 
 

Re:Copy treeview layout

When i say copy i meant, to scan one treeview and duplicate the structure into another treeview. The parent nodes and children nodes etc. This way they will both look the same.
Thanks.
 

Re:Copy treeview layout

"Sandy Johnson" < XXXX@XXXXX.COM >wrote in message
Quote
How do you copy the layout of a treeview into another treeview?
TreeView2->Items->Assign(TreeView1->Items);
Gambit
 

{smallsort}

Re:Copy treeview layout

Thanks for the response. I did not realize that it was so simple. Is there a way to iterate through the tree manually? I would like to transfer a value from the data property too.
Thanks again
Sandy.
 

Re:Copy treeview layout

"Sandy Johnson" < XXXX@XXXXX.COM >wrote in message
Quote

Thanks for the response. I did not realize that it was so simple. Is
there a way to iterate through the tree manually? I would like to transfer
a value from the data property too.
You might get faster answers if you read the help first. Everything you
need is right there. Look at the 'Items' property.
- Dennis
 

Re:Copy treeview layout

"Sandy Johnson" < XXXX@XXXXX.COM >wrote in message
Quote
Is there a way to iterate through the tree manually?
Using the Items GetFirstNode() method, you can then use the getFirstChild(),
and getNextSibling() methods of TTreeNode recursively.
Quote
I would like to transfer a value from the data property too.
TreeNodes::Assign() copies the Data property as well.
Gambit