Drag&Drop : display small box during drag Topic is solved

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
briceandre
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 670
Joined: Tue Aug 31, 2010 6:22 am
Location: Belgium

Drag&Drop : display small box during drag

Post by briceandre » Wed Dec 22, 2010 7:14 am

Hello,

I just implemented a mechanism allowing to perform drag and drop mechanism from a wxListCtrl to a wxTreeCtrl.

Everything works fine, but there is one small thing that I don't like : when the user starts dragging some lines of the list ctrl, he only sees something when he leaves the list ctrl and drags over my treeCtrl.

What I would want to do is to display moving rectangles, with the same shape as the selected list lines while the user is dragging. Those rectangles would follow the mouse movement. There are a lot of programs that do stuff like that, but I don't know if it's feasible with wxWidgets.

Does anyone has an idea ?

Regards,
Brice

jfouche
Super wx Problem Solver
Super wx Problem Solver
Posts: 442
Joined: Tue May 06, 2008 4:52 pm
Location: France

Post by jfouche » Wed Dec 22, 2010 1:53 pm

wxDropSource::SetCursor may be your friend. I'll give a try and give you feedback
Jérémie

briceandre
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 670
Joined: Tue Aug 31, 2010 6:22 am
Location: Belgium

Post by briceandre » Thu Dec 23, 2010 7:09 am

Thanks for the tip. I will try it and keep you informed

briceandre
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 670
Joined: Tue Aug 31, 2010 6:22 am
Location: Belgium

Post by briceandre » Fri Jan 28, 2011 11:24 am

Sorry for the long delay before answering, but I did not have time to check.
It works,
Thanks

Post Reply