Link to home
Start Free TrialLog in
Avatar of shaneholmes
shaneholmes

asked on

Traverse Tree View Nodes

I have a treeview and would like to start at the root and traverse each node. I need to do this utilizing the parent child relationship, and will most likely need a recursive function to do so (which backs up). I need to start at the root and visit each of its children and each of theirs and so on. The reason I need this is cause I need to build a visual tree diagram on a canvas, based off from this traverse.

Shane
Avatar of shaneholmes
shaneholmes

ASKER

My Problem is that when I do something like this to traverse, I have no idea of keeping track of parents and children when drawing the nodes on my canvas. Need someone to finish this by adding the parent and children relationship steps.

CurItem := TreeView1.Items.GetFirstNode;
 while CurItem <> nil do
 begin
  //Draw root node on canvs
  CurItem := CurItem.GetNext;
 end;

Need to know when to draw root, its children, and their children

Shane
Shane,
I can send you tomorrow a Working Example ( Printing a Treeview with Quickreport )

I am now too tired  (2:00 am)

cu

Cesario
ASKER CERTIFIED SOLUTION
Avatar of Cesario Lababidi
Cesario Lababidi
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial