wxDropTarget GetData() inside OnDragOver() ? 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
thoray
Knows some wx things
Knows some wx things
Posts: 48
Joined: Sun Oct 18, 2015 9:31 am

wxDropTarget GetData() inside OnDragOver() ?

Post by thoray »

GetData() function for wxDropTarget only works inside its OnData() function but is there way to get access to the dragged data inside OnDragOver() function?

I'd need this to visualize the drag result to the user as the cursor is moving over the canvas before left mouse button is actually released.

As this dragging only happens inside one program it wouldn't be too hard to pass knowledge of the dragged data outside wx drag&drop functionality but it would be hacky.
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxDropTarget GetData() inside OnDragOver() ?

Post by doublemax »

Can you use wxDropSource::GiveFeedback()?
https://docs.wxwidgets.org/trunk/classw ... f436726f7f
Use the source, Luke!
thoray
Knows some wx things
Knows some wx things
Posts: 48
Joined: Sun Oct 18, 2015 9:31 am

Re: wxDropTarget GetData() inside OnDragOver() ?

Post by thoray »

Yes that should work. Thanks.
Post Reply