Page 1 of 1

Format a text from Clipboard

Posted: Thu May 30, 2019 12:01 pm
by Ceprotec
Hello Sergey

I would like to format a text from clipboard from another document according to the formatting of the field being pasted, how do we proceed?
We are pasting into a TRichViewEdit component.

thanks

Re: Format a text from Clipboard

Posted: Thu May 30, 2019 12:54 pm
by Sergey Tkachenko
Sorry, I do not understand the question. Can you give an example?

Re: Format a text from Clipboard

Posted: Thu May 30, 2019 5:09 pm
by Ceprotec
I want to clear the formatting when pasting a copied text.
Sorry for my English.

Image

Re: Format a text from Clipboard

Posted: Thu May 30, 2019 6:13 pm
by Sergey Tkachenko
Call PasteTextW instead of PasteDef.
If you use RichViewActions, you can use TrvActionPasteAsText. Its default shortcut is Shift+Ctrl+V (Edit | Paste as Text command).

Re: Format a text from Clipboard

Posted: Thu May 30, 2019 8:17 pm
by Ceprotec
It worked!

Thanks Sergey