B+ Trees?

Blitz3D Forums/Blitz3D Beginners Area/B+ Trees?

Apollonius(Posted 2003) [#1]
Neither the online or offline Manuels are of any helps when it comes to Tree using the GUI...

so I create this:
MainMoTree = CreateTreeView( 2,2,170,347,MainTab1 )
but after I tryed many things but how do you add stuffs?

Could I have an example please? with a bunch of stuff in it?


WolRon(Posted 2003) [#2]
I would recommend reading Microsofts' Windows API references on Common Controls. You'll find a lot more information there that is similar enough to get you going. I'm not sure where you would find them ("I" have books at home on the subject PLUS I have Visual C++) but you could try MS's website?


skidracer(Posted 2003) [#3]
This is code from the BlitzPlus samples folder (Samples->Mak->simple_treeview.bb) which will hopefully get you started:

window=CreateWindow( "Simple TreeView demo",0,0,640,480 )

treeview=CreateTreeView( 0,0,ClientWidth(window),ClientHeight(window),window )
SetGadgetLayout treeview,1,1,1,1

root=TreeViewRoot( treeview )

hello=AddTreeViewNode( "Hello!",root )
	test1=AddTreeViewNode( "Test1",hello )
	test2=AddTreeViewNode( "Test2",hello )
	test3=AddTreeViewNode( "Test3",hello )
	test4=AddTreeViewNode( "Test4",hello )
		test5=AddTreeViewNode( "Test5",test4 )
		test6=AddTreeViewNode( "Test6",test4 )
		test7=AddTreeViewNode( "Test7",test4 )
		
While WaitEvent()<>$803

	If EventID()=$401 And EventSource()=treeview
		Select SelectedTreeViewNode( treeview )
		Case hello Notify "Hello hit"
		Case test1 Notify "Test1 hit"
		Case test2 Notify "Test2 hit"
		Case test3 Notify "Test3 hit"
		Case test4 Notify "Test4 hit"
		Case test5 Notify "Test5 hit"
		Case test6 Notify "Test6 hit"
		Case test7 Notify "Test7 hit"
		End Select
	EndIf

Wend

End



Beaker(Posted 2003) [#4]
Kaisuo - have you deleted your samples folder?


Apollonius(Posted 2003) [#5]
No I just dont use it lol :S

I look at the manuel and do what I think

WolRon
Thanks but I hate microsoft :D


Apollonius(Posted 2003) [#6]
Why doesnt it show you the little + when u start the program?
Is it possible to unfold them when program starts?


skidracer(Posted 2003) [#7]
Why doesnt it show you the little + when u start the program?


Users would then probably ask "Why do nodes start out as expanded?":)

Is it possible to unfold them when program starts?


Simply add an "ExpandTreeViewNode hello" at the end of the construction.


Apollonius(Posted 2003) [#8]
Thanks
Users would then probably ask "Why do nodes start out as expanded?":)


Because other user wanted it expended as default XD


WolRon(Posted 2003) [#9]
WolRon
Thanks but I hate microsoft :D

Whether or not you hate them has nothing to do with where the documentation is so do yourself a favor and read it.

Found this link: http://www.developerfusion.com/show/77

Like I said before, it's all similar. Just reading through it should help you enough to give you ideas and point you in the right direction.