Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HitTest method in Microsoft TreeView ActiveX control
Message
From
10/05/1997 13:03:10
Renato De Giovanni
Via Fractal Information Systems
São Paulo, Brazil
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00031436
Message ID:
00031677
Views:
83
>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
Map
View

Click here to load this message in the networking platform