Gambas 3 TreeView and TabStrip Example Code

I sometimes play around with Xojo and PureBasic for quick and simple GUI apps since the interface designers are convenient and the language makes for easy coding. I was checking out Gambas 3 and found it to be fairly good but lacking in a lot of examples. I was messing around with TreeView and TabStrip working together. It took a bit and I am sure there are better ways to approach this, but if you need examples of either of these controls this is working code.

I have a form with an HSplit. If the left side I have a TreeView and the right I have a TabStrip. I left names default and made the object expand to the window. I still haven’t figured out how to resize either side of the HStrip. This just loads some books off the file system to populate the treeview and creates a tab when clicked. I also added tab delete buttons. I have a module for the base path, but you can set it in form open. Screen shot here.

At this point I am thinking I will need to subclass and make my own form objects as this was a pain in the ass. Maybe this will help someone.

Plain Text