[DUG] Searching top level nodes only
Trevor Jones
trevorj at ihug.co.nz
Fri Jan 6 11:01:31 NZDT 2006
Grant:
else
TempNode := GKB_Vir_Tree.GetNextSibling(TempNode);
-----Original Message-----
From: delphi-bounces at ns3.123.co.nz [mailto:delphi-bounces at ns3.123.co.nz] On
Behalf Of Grant Brown
Sent: Thursday, 5 January 2006 6:01 p.m.
To: Delphi mailing list - NZ
Subject: [DUG] Searching top level nodes only
Hi List,
Using D5 and TVirtualStringTree
I have a tree set up something like the following example. Each root
node could have several thousand child nodes and each child node could
also have its own child nodes etc etc.
Root Node 1
R1 - Child 1
R1 - Child 2
Root Node 2
R2 - Child 1
R2 Child 1 - Child 1a
R2 - Child 2
R2 - Child 3
Root Node 3
R3 - Child 1
R3 Child 1 - Child 1a
R3 Child 1 - Child 1b
R3 Child 1 - Child 1b
My question is how to I just search across the top level root nodes (eg
Root Node 1 - Root Node 3)
I have tried the following but it checks every node in the tree
including child nodes and not just the top level root nodes.
TempNode := GKB_Vir_Tree.GetFirst;
repeat
Bol1 := false;
MyData := GKB_Vir_Tree.GetNodeData(TempNode);
if MyData^.DB_ID = IntArray[4] then
Bol1 := true
else
TempNode := GKB_Vir_Tree.GetNext(TempNode);
until Bol1 = true;
--
Regards,
Grant Brown
Product Development Manager
Phone : 02 4229 1185
Mobile : 0412 926 995
Email : grant at sitedoc.com.au
Web : www.sitedoc.com.au
SiteDoc - Easy to Use - Powerful Results
_______________________________________________
Delphi mailing list
Delphi at ns3.123.co.nz
http://ns3.123.co.nz/mailman/listinfo/delphi
More information about the Delphi
mailing list