While it seems there has been some interesting discussion about why a custom control of this type would be created when you can “roll your own” using the built in Listbox, I am going to present this in any case. If you have an interest, that is great, if you don’t see or have a need thats ok too.
Available at this link [ www.rdS.com/treeview_demo.zip ] is a ZIP file containing a DEMO app (see image above) for both OSX and Windows. There are still a few places where some polish is required.
If this generates any interest, when fully complete, I will most likely offer it as an encrypted control and full source code versions (need to find a decent price point)
Here is the “developer” side code required to create the tree shown above
Me.AutoUpdate=False
Me.add("E","A","Hummer",hummer)
Me.add("E","C","Cadillac",cadillac)
Me.add("E","S","Saab",saab)
Me.add("G","F","F")
Me.add("D","E","GM",gm)
Me.Add("G","H","H")
Me.add("D","G","G")
Me.add("A","B","HumVee",hummer)
Me.add("","D","Daves TreeView")
//
Me.add("D","X","Microsoft",microsoft)
Me.add("X","Y","MSDN",msdn)
Me.add("X","Z","Z")
me.add("Z","1","1")
me.add("1","2","2")
me.add("2","3","3")
Me.AutoUpdate=True
AutoUpdate locks the refresh of the control until all transactions have occured
ADD(parent, child, description,picture)