trichview.com

trichview.support




SearchText


Return to index


Author

Message

Alexander Adam

Posted: 08/14/2002 18:24:43


hi!


I am connecting different Sources of TRichViewEdit content into one.

then I use this Editor to export the content to html.

The problem now is that I create the editor in the source and assign its

parent to the form, so while exporting you can see some flickering at

top-left edge of the form, this is the trichvieweditor I create for

every peace of content I create.

But this worked just fine, but now I need to replace some words before

exporting in this editor.

So I tried this:


   procedure RVReplace(_a, _b: String);

   begin

     while RV.SearchText('[' + _a + ']', []) do

     begin

       RV.InsertText(_b);

     end;

   end;


   procedure ReplaceVariables;

   begin

     try

       RVReplace('Title', Item.Caption);

     except

       exit;

     end;

   end;


Calling "ReplaceVariables".

RV is my created TRichViewEditor.


I have found out that you have to set the focus to the Editor to make

above code working, so I call


RV.SetFocus;

ReplaceVariables.


But I _always_ get an Index Out Of Bounds error message?

Why, or better: How to do the above thing I want to do (replace some

text in my created editor) so that it works?


thanks for any help,

Alex





Powered by ABC Amber Outlook Express Converter