Narses,
This is much better (especially concerning fast loading), however it doesn't seems to account if the parentnode already exist.
let me explain
ANAME is a sort of ini file, but I have let say 60 of them all in different folders.
What your code is doing if adding for each found ANAME file a parent,
-Boeing
----B737_1
----B737_2
----B737_3
-Boeing
----B747_1
-Cessna
----C182
As you see in my eg I will have now 2 parent nodes called Boeing, but since the B747_1 is also a
Boeing manufactured plane I would like to position this under the previous -boeing node toghteter with the
B737_... nodes. Anyway this method is something very new to me, and i'm thinkng of changing my other treeview control which is listes by installed folder the way you have shown me.
Thanks for this.
Johan
---
Moderiert von
Narses: Beiträge zusammengefasst---
I think I found out why it isn't writing the childnodes under the parents.
Could it be due to following statements
Delphi-Quelltext
1: 2:
| acft := TIniFile.Create(Aname); ManLookup := TStringList.Create; |
So that for every loop it's performing recreates the both files and so looses the already created parentnodes?
When I put Manlookup declaration in the public section, also start the create during form.create, and use the free during form.close, then I have a working code. I hope this is still a good coding??
regards,
Johan