In an application I want to find all nodes that contain eg. the words "plot.plott".
I do not find a method that repeatedly give me the next node that fit the word, only the first node as in the TreeRoots.pas example.
Is the needed action not available or do I miss something obvious ??
TeeTree VCL for Borland Delphi and C++ Builder.
2 posts • Page 1 of 1
There is no method to retrieve nodes as such, however, you can implement this on a relatively easy way. The Shapes property contains all the nodes in the tree, so you can iterate these and perform your match on every node, as in:
Code: Select all
procedure TForm2.FindNodesClick(Sender: TObject); var t: integer; begin for t:=0 to Tree1.Shapes.Count-1 do if (Pos('TreeNode',Tree1.Shapes[t].SimpleText)>0)then begin Showmessage(Tree1.Shapes[t].Name); end; end;