You've already forked lazarus-ccr
remove debugoutput in carbonrichmemo. fixed example for using SaveDialog on Save RTF button
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@890 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -7,6 +7,7 @@ interface
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
||||
StdCtrls, ExtCtrls, ComCtrls,
|
||||
CarbonRichMemo,
|
||||
RichMemo;
|
||||
|
||||
type
|
||||
@ -20,6 +21,7 @@ type
|
||||
Button4: TButton;
|
||||
Button5: TButton;
|
||||
Button6: TButton;
|
||||
Edit1: TEdit;
|
||||
FontDialog1: TFontDialog;
|
||||
OpenDialog1: TOpenDialog;
|
||||
RichMemo1: TRichMemo;
|
||||
@ -80,10 +82,10 @@ procedure TForm1.Button4Click(Sender: TObject);
|
||||
var
|
||||
fs : TFileStream;
|
||||
begin
|
||||
if OpenDialog1.Execute then begin
|
||||
if SaveDialog1.Execute then begin
|
||||
fs := nil;
|
||||
try
|
||||
fs := TFileStream.Create( Utf8ToAnsi(OpenDialog1.FileName), fmCreate);
|
||||
fs := TFileStream.Create( Utf8ToAnsi(SaveDialog1.FileName), fmCreate);
|
||||
RichMemo1.SaveRichText(fs);
|
||||
except
|
||||
end;
|
||||
|
Reference in New Issue
Block a user