I have a tree view which is populated already with files/folders from another procedure. I would like to iterate one by one through the items in the tree view, going in exact order from top to bottom. However, unlike a normal list, I cannot use just a simple for
statement for this. I have to go into each node, etc.
How do I do this? I'm hoping there's a way I can do it without running a recursive procedure. As I iterate through these items, I don't necessarily care about parent or child nodes of the currently focused one. I just need to be able to read the Data
property of each node as I pass them, as well as highlight the current one in the tree view as I go through it. For each item in this tree view, I will be performing some work and want to visually display to the user which one is currently selected during this process.
TTreeView
items, Note: Accessing tree view items by index can be time-intensive, particularly when the tree view contains many items. For optimal performance, try to design your application so that it has as few dependencies on the tree view's item index as possible. – ToritorieGetFirstNode/GetNext
combination was the optimal solution. – ToritorieTTreeNode
pointer from that record. – Eligibility