TAdvRichEditor 1.7.7.0
AddLineBreak does not insert any linbreak.
Is this a known issue?
Ole
How can this be reproduced?
Retested on default TAdvRichEditor with
begin
AdvRichEditor1.AddText('line 1');
AdvRichEditor1.AddLineBreak;
AdvRichEditor1.AddText('line 2');
AdvRichEditor1.AddLineBreak;
AdvRichEditor1.AddText('line 3');
end;
and this works as expected.
What is the difference between AddLineBreak and InsertLineBreak?
AddLineBreak adds is at the end of the document.
I get linebreaks if I do:
AdvRichEditor1.addText('Line 1);
AdvRichEditor1.AddLineBreak;
AdvRichEditor1.SetCaret(cpenddoc);
What is code line three doing?
It sets the caret at the end of the document.
AdvRichEditor1.SetCaret(cpenddoc);
Is this necessary to get linebreaks? Without that line I don't get any LineBreak
Here is the final code that gives me the correct result:
AdvRichEditor1.insertmultilinetext('Date: '+datetostr(aQuery.FieldByName('aDate').AsDateTime));
AdvRichEditor1.InsertLineBreak;
AdvRichEditor1.SetCaret(cpenddoc);