Hello,
I've tried to change de D&D behavior; in certain conditions I want the drop inside the same RV to be a copy/paste instead a cut/paste (like with the Ctrl key).
the "var" parameter DropEffect: TRVOleDropEffect of OleDrop event seems a good candidate but it doesn't change anything.
I've tried also to Undo the deletion and then paste the selection but the cursor position is lost, and I'm not sure it is a good option.
Regards
TRVOleDropEffect rvdeCopy
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
In this demo, emoticons are inserted as images from TImageList.
They are inserted from RVF format (which is used by default when dragging within TRichViewEdit), you need to process OnRVFImageListNeeded:
As for the original question - sorry, it is not possible in the current version of TRichView. Please read the help file:
- you can use this even to insert dropped data yourself, then assign DropEffect and DoDefault=False. Otherwise, value assigned to DropEffect is ignored
- value assigned to DropEffect is ignored when dragging within the editor.
They are inserted from RVF format (which is used by default when dragging within TRichViewEdit), you need to process OnRVFImageListNeeded:
Code: Select all
procedure TForm1.rve1RVFImageListNeeded(Sender: TCustomRichView;
ImageListTag: Integer; var il: TCustomImageList);
begin
il := ImageList1;
end;
- you can use this even to insert dropped data yourself, then assign DropEffect and DoDefault=False. Otherwise, value assigned to DropEffect is ignored
- value assigned to DropEffect is ignored when dragging within the editor.