HPW wrote:I have a look at the TTreenode-help and I am not sure about the storage.
The pointer points to the data, but is the data then part of the node-object and stored with it?
Regarding the treeNodes, no, the data object is not part of the treeNode. That is, if you want to synchronize the tree nodes with the associated data objects then you have to create and associate those data objects yourself when a tree node is created (use AddChildObject or the Data property). Additionally, you should add code in the onDelete event handler of the treeView to delete the associated data object as well. If you want to make it part of the tree node then you should derive a descendant class and put your data objects there.
I am note sure what exactly Kambiz did there, but this issue was a past request of mine and I think this is the solution, which I found elegant and most wellcome as it follows known paths from the VCL.