>I am now answering my own query:
>
>I found a way to get the hittest() routine to work!!!!
>My boss found an answer in a previous thread on the UT that answers the problem. Apparently the inputs into Hittest() are scaled by 15. This means that if you have a pixel coordinate (x and y), in order for hittest to return valid results you have to do this:
>loNode = this.HitTest(m.x * 15, m.y * 15)
>
>Weird....
>There is still the problem of it returning a character blank instead of NULL when not over a node, but now at least the tree view drag and drop is usable.
>
Hey, Peter!
Can't believe you've got it! Congratulations!!
I had already given up...
Just let me ask you another question, as you've also been around with Drag&Drop on Treeview:
When you move a Node, how are you setting its new parent?
I would say: loNode.Parent = loTargetNode, but it doesn't work here...
To accomplish that, I'm first storing into a Cursor the information I need about the Node and about its Children. Then I remove all of them from the TreeView to add again at the new position (SCANing the Cursor).
It's not complicated because my TreeView has only 2 hierarquical levels, but there SHOULD BE an EASIER way for doing that...
I'm also having problems with DropHighLight/CreateDragImage. Are you using them too?
Renato
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only