In trying to sort out my problem with some files not showing in the files list of wxFileDialog, I also was reminded of an old nuisance I had left unsolved.
When dragging a file into the utility, the drag hint, once it reaches my utility, claims I am 'move'ing a file, when I am only copying it.
In my code I followed the DND example from the wxWidgets book - the utility is one of my first efforts at working with wxWidgets - but I never did resolve the little annoyance of the 'move' where I expected and wanted 'copy'.
Any hints on what I am still missing?
TIA
Drag n Drop hint move vs copy Topic is solved
Drag n Drop hint move vs copy
Environment: Win 10/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
MSVC Express 2019/2022
wxWidgets 3.2.2
Re: Drag n Drop hint move vs copy
I don't know the example from the book, but usually you would override OnDragOver in the drop target and return "wxDragCopy".
http://docs.wxwidgets.org/trunk/classwx ... 7e82788652
http://docs.wxwidgets.org/trunk/classwx ... 7e82788652
Use the source, Luke!
Re: Drag n Drop hint move vs copy
As far as I can tell, my code and the code in the book parallels that in the 3.0.1 DND example and in neither one can I see any override for the class DnDFile class for OnDragOver - only in the URL DnD case.
So I am still missing something
So I am still missing something
Environment: Win 10/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
MSVC Express 2019/2022
wxWidgets 3.2.2
Re: Drag n Drop hint move vs copy
In the DnD sample i only see "move" by default when dropping a file onto the file drop area. With the proposed override, i get "copy".the code in the book parallels that in the 3.0.1 DND example and in neither one can I see any override for the class DnDFile class for OnDragOver
Use the source, Luke!
Re: Drag n Drop hint move vs copy
In my case, for the DND sample, I do get the + in a small square as a graphic (no string other than the '+') when I drag a file name from the right hand pane.
If I drag a file (name) from a File Explorer window, I get the string 'move' along with the much larger graphic (two gears inside a frame) I also get while dragging within the File Explorer window and for my app
There seems to be a function to set the default action, but I have not found it used anywhere in the DND sample
If I drag a file (name) from a File Explorer window, I get the string 'move' along with the much larger graphic (two gears inside a frame) I also get while dragging within the File Explorer window and for my app
There seems to be a function to set the default action, but I have not found it used anywhere in the DND sample
Environment: Win 10/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
MSVC Express 2019/2022
wxWidgets 3.2.2
Re: Drag n Drop hint move vs copy
Thank you, doublemax.
If I override the function and simply return 'wxDragCopy' unconditionally, I do get the 'Copy' string - but still get the much fancier graphic as well.
I had assumed I would have to do more than that
If I override the function and simply return 'wxDragCopy' unconditionally, I do get the 'Copy' string - but still get the much fancier graphic as well.
I had assumed I would have to do more than that
Environment: Win 10/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
MSVC Express 2019/2022
wxWidgets 3.2.2