Too many undone things, sorry for not posting earlier.
Probably it works here as well.
Because:
I only THOUGHT I would have done it with lines.LoadFromFile.
I erred.
I did it with streams.
I will make an alternate open-methode for the txt case. Thx for the hint!
I tried this as well, opens rtfs fine, but does not display txt
LoadRTFFile(RichMemo_Notizen, OpenDialog_RichMemoNotizen.FileName);
This is my open-routine, which works fine, but does not display txt (just rtfs)
procedure TForm_Notizen.ToolButton_oeffneClick(Sender: TObject);
var
fs : TFileStream;
begin
if OpenDialog_RichMemoNotizen.Execute then begin
fs := nil;
try
// Utf8ToAnsi is required for windows
fs := TFileStream.Create(Utf8ToAnsi(OpenDialog_RichMemoNotizen.FileName), fmOpenRead or fmShareDenyNone);
RichMemo_Notizen.LoadRichText(fs);
Saved_dasRichMemo:=True; // since we opened a saved file
Filename:=ExtractFileName(OpenDialog_RichMemoNotizen.FileName);
Pfad_Texte:=ExtractFilePath(OpenDialog_RichMemoNotizen.FileName);
Caption:=Filename;
except
end;
fs.Free;
end;
end;