trichview.com

trichview.support




Re: Any way to clear contents in RichView (not edit!) viewer


Return to index


Author

Message

Sergey Tkachenko

Posted: 02/17/2003 19:59:31


RichView.Clear DOES clear the document (deletes all items).

It requres to call Format after it (as well as LoadRTF)

By the way, try ... except is not required around LoadRTF - it never throws

an exception (it returns False in case of error)




> I have tryed a few different approaches.

> I either have to destroy and recreate it or do something like:

> "

>   if RichView.Visible then

>     begin

>       RichView.Visible := False;

>       RichView.Clear; // help explains this does not clear

>       try

>         RichView.LoadRTF('');

>       except

>         // ignore (!)

>       end;

>       //--

>       Application.ProcessMessages;

>     end;

> "

>

> Reason I clear it is if e.g. the form or frame where RichView is located

> becomes invisible

> - then there is no reason to have a large document "hanging" around in

> memory.

> This is a very minor grief, but still, any better ideas?

>

>

>

> best regards

> Thomas Schulz

>

>





Powered by ABC Amber Outlook Express Converter