about DND, and mouseMove

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
gpu
Experienced Solver
Experienced Solver
Posts: 92
Joined: Tue Aug 12, 2014 3:46 am

about DND, and mouseMove

Post by gpu » Tue Aug 26, 2014 7:54 am

hi, here is my problem, i have a custom myPanel. And I want to drag from one myPanel and then drop on another myPanel.
Should I inheritite myPanle from wxDropTarget.
And while the dragging, I still want to do sth else(eg, draw a line ended with the mouse position in the MouseMotion event), so the DoDragDrop compatible with this?
can the MouseLeftButtonUp implement the drop functionality without / instead of the wxDropTarget?

gpu
Experienced Solver
Experienced Solver
Posts: 92
Joined: Tue Aug 12, 2014 3:46 am

Re: about DND, and mouseMove

Post by gpu » Wed Aug 27, 2014 2:00 am

actually I just want to LButtonDown on one panel, and then drag to another panel, then LButtonUp, at last draw a line between them,
(1)if i just link them without sending any data, should I still use the DND of wxWidgets.....another way is to just check the boundingbox the panel when LButtonUp, but that is slow cause have to iterate all the panels.
(2)if I want to send some data, how I use the DND as I said yesterday.

User avatar
doublemax
Moderator
Moderator
Posts: 15866
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: about DND, and mouseMove

Post by doublemax » Wed Aug 27, 2014 6:51 am

I've never used the wxWidgets DnD api so i can't help much with it. But i'm pretty sure both ways (with or without it), are possible.
Use the source, Luke!

gpu
Experienced Solver
Experienced Solver
Posts: 92
Joined: Tue Aug 12, 2014 3:46 am

Re: about DND, and mouseMove

Post by gpu » Wed Aug 27, 2014 7:18 am

Thank you, and anyone familiar with this problem? :D

Post Reply