I am using BlitzUI for my program. Recently, I have required to add a TreeView gadget for a particular list. I have, however, required (by the way, required is my word of the day) to play about with the code a bit for the gadget to match my needs and I have become rather lost.
I've successfully added a TM_GETCOUNT, and TM_GETSELECTED (recieving the index, not the handle of a node). I have also set the treeview gadget to return a gadget event when something on it is selected.
Now, I am getting lost when I need to delete nodes and set the index selected on the TreeView.
Presently I have attempted adding the following to the blitzUI source code around lines 1900 to 1941 (and these do not work at all):
and
Can you please help me figure out how to get this working?
I've successfully added a TM_GETCOUNT, and TM_GETSELECTED (recieving the index, not the handle of a node). I have also set the treeview gadget to return a gadget event when something on it is selected.
Now, I am getting lost when I need to delete nodes and set the index selected on the TreeView.
Presently I have attempted adding the following to the blitzUI source code around lines 1900 to 1941 (and these do not work at all):
Case "TM_SETSELECTED" tree\currentindex = Param1 tree\Selected = tree\CurrentIndex
and
Case "NM_DELETE" if node\hasChildren blacklist = handle(node.node) for node.node = each node if handle(node\ParentNode.Node) = blacklist node\owner\count = node\owner\count - 1 node\parentNode\count = node\parentNode\count - 1 delete node endif next node.node = object.node(blacklist) delete node node\owner\count = node\owner\count - 1 node\parentNode\count = node\parentNode\count - 1 else delete node node\owner\count = node\owner\count - 1 node\parentNode\count = node\parentNode\count - 1 endif
Can you please help me figure out how to get this working?