The MaxGUI Beginner Tutorial Series

BlitzMax Forums/BlitzMax Tutorials/The MaxGUI Beginner Tutorial Series

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

@Assari, if you are still around.
The latest version of MaxGUI (1.16) needs a 'ViewRoot' specifically created :
SuperStrict
Import maxgui.drivers
Local MyWindow:TGadget=CreateWindow("TreeView Example", 40,40,400,400)
Global MyTreeView:TGadget=CreateTreeView(5,0,200,360,MyWindow)
Local Folder:Int=ReadDir(BlitzMaxPath())

Local File:String
Local root:TGadget=TreeViewRoot(mytreeview)
Repeat
    File=NextFile(Folder)
	Print file
    AddTreeViewNode(file,root)
Until File=Null

Repeat
  WaitEvent()
  Select EventID()
  Case EVENT_WINDOWCLOSE
     End
  End Select
Forever
End


<edit> and, of course, import maxgui.drivers for each if the SVN version of MAXGui is used.