I want to insert a footnote with text that has CR, LF characters. but after insert, this characters have been deleted.
Code: Select all
procedure TForm1.mitInsertFootnoteClick(Sender: TObject);
var
FootNote: TRVFootnoteItemInfo;
NoteRef: TRVNoteReferenceItemInfo;
MyNoteText : string;
begin
MyNoteText := 'This is first line'+#13+#10+'This is second line'+#13+#10+'This is third line';
FootNote := TRVFootnoteItemInfo.CreateEx(rveMain.RVData,
RVGetNoteTextStyleNo(rvs, rveMain.CurTextStyleNo), 1, False);
NoteRef := TRVNoteReferenceItemInfo.CreateEx(FootNote.Document,
RVGetNoteTextStyleNo(rvs, 0));
FootNote.Document.AddItem('', NoteRef);
FootNote.Document.AddNL(' '+MyNoteText, 0, -1);
if rveMain.InsertItem('', FootNote) then
rveNote.SetFocus;
end;