I use ScaleRichViewEdit version 4.0.3 and RichView v13.0.5
and try to use the MarkSubStringW function from MarkSearch.pas.
See: http://www.trichview.com/forums/viewtopic.php?t=57
I create a new form and drop a SRichViewEdit.
The FormCreate event looks so:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
SRichViewEdit1.Clear;
SRichViewEdit1.RichViewEdit.LoadText(ExtractFilePath(Application.ExeName)+'Unit1.pas', 0, 0, False);
SRichViewEdit1.Format;
MarkSubStringW('TForm1', clBlack, clRed, false, false, SRichViewEdit1.RichViewEdit, nil);
end;
I get a "List index out of bounds (-1).".
Can anyone provide me a simple example how to use the MarkSubStringW with ScaleRichViewEdit?
Best regards
Jan