Slow paste. Is there a way to put an hourglass cursor ?

General TRichView support forum. Please post your questions here
Post Reply
gdemers_logilys
Posts: 13
Joined: Mon Jun 16, 2014 1:10 pm

Slow paste. Is there a way to put an hourglass cursor ?

Post by gdemers_logilys »

When I copy text from an outlook reply window (it looks like some kind of word editor embedded in outlook), it takes several seconds to paste it into my TRichViewEdit. It's way faster if I copy the same text from outlook while viewing original mail. (not in edit mode).

I don't mind the wait, but I would like to change the cursor to crHourGlass. I can change the cursor in the OnPaste event, but I don't know where to put my code to put it back to crDefault. Is there a way to do it ?

Have a nice day !
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Slow paste. Is there a way to put an hourglass cursor ?

Post by Sergey Tkachenko »

Code: Select all

procedure TForm3.RichViewEdit1Paste(Sender: TCustomRichViewEdit;
  var DoDefault: Boolean);
const
  Pasting: Boolean = False;
begin
  if Pasting then
    exit;
  Pasting := True;
  try
    Screen.Cursor := crHourGlass;
    Sender.Paste;
    Screen.Cursor := crDefault;
    DoDefault := False;
  finally
    Pasting := False;
  end;
end;
update: corrected, added assignment DoDefault := False
Post Reply