I must add 1,000,000+ records towards the root node of the TreeListCtrl. Therefore I must allow it to be "virtual", i.e. work as being a virtual ListCtrl to ensure that will still be fast and that i can certainly scroll around because of the presently-displayed products being loaded on-demand. However I can't make use of a virtual ListCtrl because I should also have the ability to expand the 1,000,000 products to show its children (the products will invariably have under 50 children). Is this done effectively having a TreeListCtrl? Or having a different class? From the own experiments with treemixin.VirtualTree and wx.devices.TreeListCtrl, over-loading the OnGetItemText method doesn't work exactly the same way because it does having a plain virtual ListCtrl. It does not get known as on-demand because the user is scrolling around, meaning all 1,000,000 products need to be put into the TreeListCtrl ahead of time.

One factor you may do is leave the sub-nodes empty, and catch the expand-node event. Then you definitely determine when the node's sub-nodes are populated. When they aren't, you add them before growing the node. If they're populated, you just disregard the event.

You are right the treemixin does not result in the TreeListCtrl really virtual. I figured about this after i was developing treemixin, however the one factor I did not understand how to solve was how you can know which lines to attract left of products once the user is searching at products deep-down the tree, e.g. 10000 to 10030. Knowing of the solution for your I'll happily adapt treemixin.

Frank

Author treemixin

I believe what I'll do is make use of a virtual ListCtrl together with a skip-list for that data model. Initially, the information model will retain the a million top-layer nodes. Whenever a node is broadened, I'm able to place its children in to the skip-list in log time (a lot better than the linear time to have an array). I'll indent what they are called from the children within the ListCtrl to ensure that you are able to aesthetically tell who their parent is. I believe the log search time for that skip-list (instead of instant random-access time to have an array) is going to be fast enough to handle user's scrolling. If a person includes a better suggestion, please tell me. I'll offer an update later on whether my idea labored or otherwise.