Board index » delphi » save extension

save extension

Hello,

Is there someone who can help me ?
When I save, I also want that he save the extension of the file.
I have he following procedure

procedure TForm2.opslaan1Click(Sender: TObject);
begin
If SaveDialog1.Execute then
Memo1.lines.SaveToFile(SaveDialog1.FileName);
Memo1.Modified := False;
end;

and in the filter of Save1.Dialog
data file    *.dat
word file *.doc

What do I have to do?
Thaks
Jeroen

 

Re:save extension


Hallo Jeroen,

Fill in the DefaultExt of the SaveDialog in the Object
Inspector with the first extension which appears in your
Filter. This is in your case dat (note: without the period).

- Pieter

Quote
clicq wrote...
> Hello,

> Is there someone who can help me ?
> When I save, I also want that he save the extension of the file.
> I have he following procedure

> procedure TForm2.opslaan1Click(Sender: TObject);
> begin
> If SaveDialog1.Execute then
> Memo1.lines.SaveToFile(SaveDialog1.FileName);
> Memo1.Modified := False;
> end;

> and in the filter of Save1.Dialog
> data file    *.dat
> word file *.doc

> What do I have to do?
> Thanks
> Jeroen

Other Threads