K
kevin
How do you allow an object to be stored on the clipboard such that it
still pastes in text format, but also can be pasted within the
application that is aware of how to deal with the object?
For example, I have this object I've called CompositeTextObject. An
instance of the object (cto) can have three properties:
prefix = "pre";
body = "123";
suffix = "suf";
Represented as ordinary text it would be "pre-123-suf".
I've been able to implement the cut/copy/paste of the
CompositeTextObject fine by using Clipboard.SetDataObject etc.
I've also tried to implement my own custom DataObject that implements
the IDataObject interface.
However, this doesn't seem to work.
Does somebody have working sample code that addresses this?
Thanks,
Kevin.
still pastes in text format, but also can be pasted within the
application that is aware of how to deal with the object?
For example, I have this object I've called CompositeTextObject. An
instance of the object (cto) can have three properties:
prefix = "pre";
body = "123";
suffix = "suf";
Represented as ordinary text it would be "pre-123-suf".
I've been able to implement the cut/copy/paste of the
CompositeTextObject fine by using Clipboard.SetDataObject etc.
I've also tried to implement my own custom DataObject that implements
the IDataObject interface.
However, this doesn't seem to work.
Does somebody have working sample code that addresses this?
Thanks,
Kevin.