Autor Beitrag
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Mi 16.03.05 17:21 
Ich stell im filter-editor folgendes ein

Filername Filter

Textdateien (.txt) .txt

Wenn ich nun mache:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
if savedialog1.execute then
begin
memo1.Lines.savetofile(savedialog1.filename);
end;


dann erscheint immer nur eine Datei ohne endung, also meinetwegen 'test' statt 'test.txt'.

ich habs auch schon bei filer mit '*.txt' probiert. ohne erfolg.

Es hat ja so schon mal in nem anderen programm geklappt (glaube ich zumindest) und ich hab absolut keinen plan was ich falsch mache!

helft mir bitte!

Moderiert von user profile iconAXMD: Delphi-Tags hinzugefügt.
Sprint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 849



BeitragVerfasst: Mi 16.03.05 17:28 
Vielleicht hilft DefaultExt.

_________________
Ciao, Sprint.
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Mi 16.03.05 17:36 
@Koller: bitte verwende Delphitags! Das ist nicht das erste Mal, dass ich dich daran erinnern muß.

Zum Problem: DefaultEx wie Sprint richtig sagt. Ansonsten mal in der OH nachschauen, mit welcher Property man solche Dinge wie Textdateien (*.txt) in die Dateiendungskombobox im SaveDialog bekommt ;)

AXMD
Marco D. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Fr 18.03.05 15:37 
Titel: savedialog
Kann mal bitte jemand eine genaue anleitung geben, wie man mit savedialog eine textdatei speichert?

Also soll der text aus memo1 mithilfe von savedialog1 in einer test.txt datei gespeichert werden. bitte haarklein, denn ich krieg immer nur eine 'test' statt 'text.txt' hin.

danke om voraus!

mfg Koller
Sprint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 849



BeitragVerfasst: Fr 18.03.05 16:02 
Titel: Re: savedialog
user profile iconKoller hat folgendes geschrieben:
Kann mal bitte jemand eine genaue anleitung geben, wie man mit savedialog eine textdatei speichert?


ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
  with SaveDialog1 do
  begin
    Filter := 'Text Dateien (*.txt)|*.txt|Alle Dateien (*.*)|*.*';
    DefaultExt := '.txt';
    if Execute then
      Memo1.Lines.SaveToFile(FileName);
  end;

_________________
Ciao, Sprint.
MisterBum83
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 245
Erhaltene Danke: 2

WIN XP
Delphi 6
BeitragVerfasst: Fr 18.03.05 16:04 
Vielleicht handelt es sich ja um eine test.txt und du hast in Windows nur den Menüpunkt 'Erweiterung bei bekannten Dateitypen ausblenden' markiert... (Arbeitsplatz-Extras-Ordneroptionen-Ansicht)