treeview problem...

BlitzMax Forums/BlitzMax GUI Programming/treeview problem...

So here I come to the problem:

Import maxgui.drivers

Global mainwindow:TGadget=createwindow("window",200,200,500,500,desktop())
Global BooklistTree:TGadget=CreateTreeView(0,0,200,300,mainwindow)
AddTreeViewNode("test",BooklistTree)
Local roottree:TGadget = AddTreeViewNode("Root", TreeViewRoot(BooklistTree),1)
Local count:Int
Local listbox:TGadget[200]
Local treebooklist:TGadget[200]
Repeat
	treebooklist[count]=AddTreeViewNode(String(count),roottree,0)
	listbox[count]=CreateListbox(200, 0, 300, 400, mainwindow)
		hidegadget listbox[count]
		treebooklist[count].context=listbox[count]
	count=count+1
Until count=10

'....

Repeat
        Local W_Event:Int=WaitEvent()
	Select W_Event
              Case EVENT_GADGETSELECT
			Local E_Source:Object=EventSource()
			Select E_Source
				Case treebooklist
					Local Node:TGadget= SelectedTreeViewNode(booklisttree)
	       			' So what now ?	
					
	                End Select
             Case EVENT_WINDOWCLOSE End
       End Select
Forever