Treeview: Problem with expanding the items

BlitzMax Forums/BlitzMax GUI Programming/Treeview: Problem with expanding the items

Hey there,
I'm having some problems with my TreeView. It works, but there is no "+" symbol in front of the folder-items. They appear only if I double-click the items.

And that's not really nice, lol
any ideas?

here's my code:
Global TreeView:TGadget=CreateTreeView(ClientWidth(MainWindow)-210,35,200,360,MainWindow) 
Global TreeViewIconStrip:TIconStrip=LoadIconStrip("images/treeicons.png") 
SetGadgetIconStrip(TreeView, TreeViewIconStrip)
showTreeView(".",TreeView)



Select EventID()
	Case EVENT_GADGETACTION
		Select EventSource()
			Case TreeView
				Local Node:TGadget = SelectedTreeViewNode(TreeView)
				Local s:String=String(Node.Context)
				If s>""
					showTreeView(s,Node)
					Node.context=""
				EndIf
				ExpandTreeViewNode(node)
		End Select
End Select



Function showTreeView:Int(Dir:String, Parent:TGadget)
	Local Folder:Int=ReadDir(Dir)
	Local File:String
	Local FullPath:String
	
	Repeat
		File=NextFile(Folder)
		If File<>"." And File<>".." And File<>Null
			FullPath = RealPath(Dir+"/"+File)
			If FileType(FullPath)=FILETYPE_DIR Then
				Local handle:TGadget=AddTreeViewNode(File,Parent,0)
				handle.context=FullPath
			Else
				AddTreeViewNode(File,Parent,1)
			EndIf
		EndIf
	Until File=Null
EndFunction



thanks in advance!
mike