Extended TreeView

BlitzPlus Forums/BlitzPlus Programming/Extended TreeView

Yes! I fixed the TVS_EDITLABELS constant, but I still have a problem, when I've entered the text, it doesn't change the text of the node...

; TVS 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

; Style, do NOT modify!
Const GWL_STYLE = -16

; Create the gadgets
window = CreateWindow( "Extended TreeView Test", 200, 200, 220, 140, Desktop( ), 1 )
	tree   = CreateTreeView( 10, 10, 200, 90, window )
		node   = AddTreeViewNode( "TEXT",  TreeViewRoot( tree ) )
		node2  = AddTreeViewNode( "TEXT2", node                 )
		node3  = AddTreeViewNode( "TEXT3", TreeViewRoot( tree ) )
		node4  = AddTreeViewNode( "TEXT4", TreeViewRoot( tree ) )

	; Modify the treeview
	Treehwnd = QueryObject( tree, 1 )
	style = api_GetWindowLong( Treehwnd, GWL_STYLE )
	api_SetWindowLong( Treehwnd, GWL_STYLE, style + TVS_EDITLABELS )

; Loop
While WaitEvent( )<>$803

Wend