How to create an hierarchial list

I am trying to allow for a structured input within a Listbox.
Similar to how an outliner works, I want to be able to edit a cell to add an entry, go to the next row, press tab, and then indent the next line beneath as part of a hierarchy.

I noticed that to use a hierarchy in the listbox, I need to add the row with the addfolder method.
How can I add a hierarchy on the fly rather than reading in preexisting levels of data? If the row already exists, how do I make it part of a hierarchy?

Is a List box the right component? Any advice is appreciated.


Take a look at my “treeview” control… you can add whatever branches to the hieracrchy as you see fit

and contrary to what that website says… it DOES work with all current versions of macOS and windows

Thank you Dave, I’ll take a look at this control.