Treeview Label edit

BlitzMax Forums/MaxGUI Module/Treeview Label edit

Zeke(Posted 2010) [#1]
i just need to know is this possible in linux and maxoc.. and its that a reason why this is not in maxgui?

i just made some Win testing.. and i just added some lines code to maxgui module.. and now i can set style EDIT_LABELS and when is "double click" treeview node, i can edit its text..

and im now what i can do.. is there some gurus.. who can help me..

If (style & TREEVIEW_EDITLABELS) Then wstyle:|TVS_EDITLABELS ' Added by Zeke

^^ i also added that to the create method.. hmm..

i also win32maxguiex i added this:
	Method OnNotify(wp,lp)
		Local nmhdr:Int Ptr
		Local itemnew:Int Ptr
		Local node:TWindowsTreeNode
		
		Super.OnNotify(wp,lp)	'Tool-tips
		
		nmhdr=Int Ptr(lp)
		Select nmhdr[2]	'code
			Case TVN_BEGINLABELEDITW,TVN_BEGINLABELEDITA 'Added by Zeke.. Label edit begins
				DebugLog "Label Edit BEGINS"
			Case TVN_ENDLABELEDITW,TVN_ENDLABELEDITA 'Added By Zeke.. Label edit Ends
				DebugLog "Label Edit ENDS"



also some other things.. but now i just need to know.. what next..
some new events? EVENT_TREEVIEWNODE or what...

^^ or is this even possible in mac or linux


SebHoll(Posted 2010) [#2]
To define a new event, try adding the line:
PostGuiEvent( EVENT_GADGETDONE, 0, KeyMods(), 0, 0, node )
...under the TVN_ENDLABELEDITW, TVN_ENDLABELEDITA case block. However, you will need to work out what node should be first (look at OnNotify()'s other case blocks for clues).

For Mac OS X, you might like to take a look at NSTableView's textShouldBeginEditing (and related) selectors.

Unfortunately, I don't think the Flu_Tree_Browser widget (which FLTKMaxGUI uses to render the GUI on Linux) has built-in support for user-editing of nodes, so I'm not really sure what to suggest there.

Hope this helps!