Saving from multiple RichEdit's to a file

Hi! I have a problem here since i don't know why it's now working correctly. If i change the Code and replace the RichEdit's with TMemo's it works perfectly yet it doesn't with the RichEdit's ...why?
Here's the code :
[code]
if SaveDialog1.Execute then begin

if Checkbox1.Checked then begin

RichEdit1.Lines.SaveToFile(saveDialog1.FileName);
AssignFile(mojaDat, saveDialog1.Filename);
Append(mojaDat);
WriteLn(mojaDat, ' ');
WriteLn(mojaDat, RichEdit2.text);
CloseFile(mojaDat);
end

Else begin

RichEdit5.Lines.SaveToFile(saveDialog1.FileName);
AssignFile(mojaDat, saveDialog1.Filename);
Append(mojaDat);
WriteLn(mojaDat, ' ');
WriteLn(mojaDat, RichEdit6.text);
CloseFile(mojaDat);
end;


end;

[/code]
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories