Extended TreeView

BlitzPlus Forums/BlitzPlus Programming/Extended TreeView

Hi!

I'm working on an application in B+, and I am using a treeview. http://phoenixoft.com/Designer.rar It would be great to modify the treeview a little, to make it support two extra things: Name modification, so that you can change the name of a treeview node by clicking on it twice. And drag & drop, so that you can move the nodes however you want.

I know this can be done with SetWindowLong, SendMessage etc.
I have tried to make it work, but without success. Here's my code:
; Treeview constants
Const TVS_HASBUTTONS        = $0001
Const TVS_HASLINES          = $0002
Const TVS_LINESATROOT       = $0004
Const TVS_EDITLABELS        = $0008
Const TVS_DISABLEDRAGDROP   = $0010
Const TVS_SHOWSELALWAYS     = $0020
Const TVS_RTLREADING        = $0040
Const TVS_NOTOOLTIPS        = $0080
Const TVS_CHECKBOXES        = $0100
Const TVS_TRACKSELECT       = $0200
Const TVS_SINGLEEXPAND 	    = $0400
Const TVS_INFOTIP      	    = $0800
Const TVS_FULLROWSELECT	    = $1000
Const TVS_NOSCROLL     	    = $2000
Const TVS_NONEVENHEIGHT	    = $4000

Const TVS_SHAREDIMAGELISTS  = $0000
Const TVS_PRIVATEIMAGELISTS = $0400

; Create the gadgets
window = CreateWindow( "Extended TreeView Test", 200, 200, 220, 140, Desktop( ), 1 )
	tree   = CreateTreeView( 10, 10, 200, 100, window )
		node   = AddTreeViewNode( "TEXT", TreeViewRoot( tree ) )

	; Modify the treeview
	; api_SetWindowLong( QueryObject( tree, 1 ), ?, ? )

; Loop
While WaitEvent( )<>$803

Wend


I think that the standard blitz treeview has the flag TVS_DISABLEDRAGDROP, so I have to remove that, and I have to add TVS_EDITLABELS.

There are people here who can solve this problem, please help me out.