Cancel Loading RTF

General TRichView support forum. Please post your questions here
Post Reply
topcat
Posts: 8
Joined: Wed Apr 11, 2007 6:50 pm

Cancel Loading RTF

Post by topcat »

When an RTF is loaded from a memorystream is it possible to cancel the progress during loading. How do I do this safely?

The reason I ask is because I have a dialog box containing a cancel button which displays when an RTF file is loading. I would like the cancel button to stop the loading process.

Thanks for your time!
Sergey Tkachenko
Site Admin
Posts: 17565
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

I did not think about it... But I believe calling Abort in OnProgress must work.
topcat
Posts: 8
Joined: Wed Apr 11, 2007 6:50 pm

Post by topcat »

I used the following to cancel loading rtf:

rtfAbort : boolean=False; // global var

cancel button event:

rtfAbort := True;

in the OnProgress event for trichview:

if rtfAbort then
begin
Richeditview1.clear;
Abort;
end;
Post Reply