Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE DragDrop from ListView to a TreeView object
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00159797
Message ID:
00159952
Views:
23
>My issue is really with the TreeView and the HitTest() method.
>
>After you provided my with the logic for PixelsToTwips, I been testing my drag-n-drop. If you can picture this, Windows Explorer has the same interface that I am trying to implement in my app. I highlight items in the ListView and drag them to a TreeView Node(all I need to know is what node the use dropped on), however, if the node that I drop my items is not the one currently expanded, HitTest() returns the TreeView's Root Node object.
>
>As far as you know is there anything else that I need to do in the TreeView OLEDragDrop Method other than what I've alreay tried
>
>TreeView.OLEDragDrop Method
>---------------------------
>LPARAMETERS data, effect, button, shift, x, y
>
>*-- Pixels to Twips
>m.lnXTwips = 0
>m.lnYTwips = 0
>THISFORM.PixelsToTwips( @lnXTwips, @lnYTwips )
>
>*-- TreeView node user dropped on
>THIS.DropHighLight = THIS.HitTest( x * m.lnXTwips, y * m.lnYTwips )
>
>*-- At this point I would perform my operation
>
>Thanks

I should check my code when I get home. BTW didn't get why you recalculate twips
each time in TreeView.OLEDragDrop Method? You can do it just once in form.Load method and store to the form properties.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform