I am parsing text files (Basic program code) and building an explorer style tree to navigate the code by category. Attached is the working code I am using to create a database for a single file using two arrays of records for root (Category) and child (items). (L0CodeData and L1CodeData)
In practice a Basic program can reference Include files and I need to extend my explorer to support additional code files as hashed up in the image below.
Example Explorer tree with Included Child Trees
To do this I have created a tFileTree class which holds the level0 and Level1 records for a single file. I recurse through the Include files generating a new tFileTree class for each include file encountered. These tFileTree classes are held in a List Collection (tFileTrees). See second attachment.
Is this the right approach or is there a better way to create this database because I am having difficulty getting my head around mapping this setup onto the VirtualStringtree.