cannot paste after close/open editor

General TRichView support forum. Please post your questions here
Post Reply
kostyan29
Posts: 2
Joined: Thu Oct 15, 2020 10:24 am

cannot paste after close/open editor

Post by kostyan29 »

Hello! I have a strange problem. I try to use TRichView with database (Delphi 10.3, Firebird). File saved in BLOB field.

step 1. I read stream from DB, and load file from stream (RichViewEdit1.LoadRVFFromStream(stream)). That's all OK. I copy something in Word or OpeOfficeWriter (text,tables, pictures, etc.) and try to paste it into editor. On first time, I CAN do it. Clipoard was pasted to editor, and I can save it (RichViewEdit1.SaveRVFToStream(stream,false)). Then, I close editor's form .

step 2. I open file from DB again. All what I inserted on previous step is saved and loaded. All OK. Now I try to copy and paste something else from Word again. But now I CAN NOT do it. I use "Ctrl+V", right click of mouse and "Paste" command... It doesn't matter which way I use - I can not paste from clipboard. Nevertheless, I can type text, work with tables pictures, I can save it, I can load other files. I can do all but copying/pasting.

step 3. I reload my program. And after reloading I can paste from clipboard. But I can do it until I close form with editor. After I can not paste.

I think, reason in closing form with editor and following creating new form. Maybe, something stops working.
P.S. Sorry for my English.
kostyan29
Posts: 2
Joined: Thu Oct 15, 2020 10:24 am

Re: cannot paste after close/open editor

Post by kostyan29 »

Problem is solved. It was my mistake. Form don't destroyed after close. I just had added following code

procedure TRichForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action:=cafree;
end;

and all will works fine. Sorry!
Post Reply