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 » Thu Apr 22, 2021 11:25 am

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: 16012
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Copying folders to the clipboard

Post by doublemax » Thu Apr 22, 2021 11:54 am

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 » Thu Apr 22, 2021 1:08 pm

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

Post Reply