Page 1 of 1

Paste target wrong

Posted: Sun Jul 09, 2017 2:10 pm
by wisz
Clerk hello:

In TRichViewEdit, call up the Find dialog box and in the keyword input box press Ctrl + V, the content is pasted to TRichViewEdit.

Re: Paste target wrong

Posted: Sun Jul 09, 2017 3:25 pm
by Sergey Tkachenko
It's not because of the editor, but because of an action, menu item or toolbar button having "Ctrl + V" shortcut.
When you press Ctrl+V, it is handled by this action/menu/button.

Unfortunately, I do not know how to solve this problem.
If you use TrvActionPaste, it is smart enough to handle not only TRichViewEdit, but also TEdit, TComboBox and TMemo.
So, if you create your own Find dialog in Delphi, Ctrl+V will work correctly.
But I do not know how to do it for the standard Windows dialogs.

Workarounds for users:
- use Shift+Insert
- right click the editor in the Find dialog and choose "Paste" from the menu.

You can also consider removing shortcut for Copy, Paste and Cut actions. In this case, the editor itself will process Ctrl+C, Ctrl+V and Ctrl+X. It will do it only when it is focused.
However, if you use RichViewActions, this solution has disadvantages, because Paste and Cut actions provide additional features:
- if RVAControlPanel.HTMLComponent is assigned, they allow pasting in HTML format
- if RVAControlPanel.DownloadInterface is assigned, they allow downloading external images referred from HTML and RTF files.

Re: Paste target wrong

Posted: Mon Jul 10, 2017 1:23 am
by wisz
OK, I see. Thank you for your answer. :D