Einzelnen Beitrag anzeigen

Benutzerbild von Störtebeker
Störtebeker

Registriert seit: 9. Jul 2007
398 Beiträge
 
#6

Re: autom. Erweiterung beim Savedialog...

  Alt 31. Jul 2007, 13:50
meinst du so:

Delphi-Quellcode:
procedure TForm2.Speichern1Click(Sender: TObject);
begin
if SaveDialog1. Execute then
SynEdit1.Lines.SaveToFile(SaveDialog1.FileName);
if ExtractFileExt(SaveDialog1.FileName) = 'then
  case SaveDialog1.FilterIndex of
    1: DateiName := ChangeFileExt(SaveDialog1.FileName,'.rtf');
    2: DateiName := ChangeFileExt(SaveDialog1.FileName,'.txt');
    3: DateiName := ChangeFileExt(SaveDialog1.FileName,'.html');
    4: DateiName := ChangeFileExt(SaveDialog1.FileName,'.htm');

end;
"And he piled upon the whale´s white hump - a sum of all the rage and hate felt by his whole race.
If his chest had been a cannon, he would have shot his heart upon it."
  Mit Zitat antworten Zitat