- I have worked out that wx.DataObjectComposite is about different versions of the same object (e.g. a text version, an image version etc) - not about multiple items of the same type.
From a Robin Dunn answer in 2008:
"You can only have one data object of each type on the clipboard at the same time. DataObjectComposite helps you have more than one object, but you are still limited by the platform to a single text object, a single bitmap object, etc.
Another way to look at it is that the clipboard can only allow a single object to be available at a time, but does allow for multiple representations of that same single object to be provided. For example, you could have the string “foobar”, a bitmap drawing of “foobar” and a custom data format that is pickle of the foobar object. On the other hand you are trying to have multiple objects present, each with a single representation (i.e. you were storing each cell independently.)
So the thing to do would be to figure out the various ways that you want to be able to provide the all data in the listctrl as a single data object, such as a string in tab-separated-values format, or similar. If you want to provide multiple representations then you can use the DataObjectComposite to do that."
-
I have also worked out that adding multiple objects to the clipboards using wx.TheClipboard.AddData() only retains the last. You still can’t add multiple items of the same sort to the clipboard. When you paste you just get the last of a certain type.
-
So what if I want to have multiple images? It is possible to copy multiple images to the clipboard in office suites, file managers, when copying and pasting selections from HTML etc. So the OS allows it. Is this a wxPython limit? Or is there some way of making an object which is a set of images? Note - I don’t want to stitch the images together into one larger image.