[DUG] Searching top level nodes only
Grant Brown
grant at sitedoc.com.au
Thu Jan 5 18:01:00 NZDT 2006
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
More information about the Delphi
mailing list