Copying folders to the clipboard

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
CnnC
Knows some wx things
Knows some wx things
Posts: 31
Joined: Thu Mar 08, 2018 7:40 am

Copying folders to the clipboard

Post by CnnC »

Good day! Please tell me how to copy folders from wxGenericDirCtrl to clipboard.

The wxClipboard object accepts objects derived from the wxDataObject class. Base derived classes do not support folders. Apparently need to create a custom class based on wxDataObject. Tell me, maybe someone came across such a problem.
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Copying folders to the clipboard

Post by doublemax »

Are you saying that you tried wxFileDataObject and it does not work with folders?
Use the source, Luke!
CnnC
Knows some wx things
Knows some wx things
Posts: 31
Joined: Thu Mar 08, 2018 7:40 am

Re: Copying folders to the clipboard

Post by CnnC »

Sorry, everything works. I didn't pass the folder path in the addFile method
Post Reply