Autor Beitrag
Spreemy
Hält's aus hier
Beiträge: 10

Win XP
D7 Prof
BeitragVerfasst: Di 28.09.04 22:53 
Hi,
ich habe ein Dbgrid das Daten aus meiner .db(Paradox) anzeigt.
Jetzt möchte ich dass bei jedem oncellclick event eine entsprechende .txt file im memo gezeigt wird.
Die Textfiles heißen gleich wie die grid einträge + txt.
Kleines Beispiel zur Veranschaulichung:
Dbgrid steht auf Banane
Dann soll im Memo Banane.txt geladen werden.
Danke für eure Antworten

Ps. über bischen code würd ich mich freuen, bin Amateur
Martin77
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 282

XP Prof
D6 Prof, D7 Personal, D7 Enterprise, D8 personal
BeitragVerfasst: Mi 29.09.04 06:39 
was hast denn bisher schon probiert?
grayfox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 800

win98, winXP
D4 Standard; D6 Personal
BeitragVerfasst: Mi 29.09.04 08:31 
hallo spreemy!

was hältst du von
ausblenden Delphi-Quelltext
1:
  Memo1.Lines.Add(Dein_DataSet.FieldByName('Feldname').asString + Deine_Ergänzung					

:?:

mfg, stefan
Spreemy Threadstarter
Hält's aus hier
Beiträge: 10

Win XP
D7 Prof
BeitragVerfasst: Mi 29.09.04 12:35 
Ja soweit war ich schon, aber es soll ja nicht z.b. Banane.txt im Editfeld stehen sondern der Inhalt der Banane.txt
Danke
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 29.09.04 12:47 
Versuch mal
ausblenden Delphi-Quelltext
1:
Memo1.Lines.LoadFromFile(Dein_DataSet.FieldByName('Feldname').asString + Deine_Ergänzung);					
Spreemy Threadstarter
Hält's aus hier
Beiträge: 10

Win XP
D7 Prof
BeitragVerfasst: Do 30.09.04 11:05 
Danke funktioniert perfekt.
Ich will ja nicht nerven, aber ich hab noch ein Problem.
Wie kann ich per Buttonclick aus einem edit eine txt Datei erstellen lassen?
Danke
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Do 30.09.04 11:19 
Du nervst nicht.
Bitte trotzdem nächstes mal dran denken: Neue Frage, neuer Thread.

Meinst du sowas?
ausblenden Quelltext
1:
Memo1.Lines.SaveToFile(Edit1.Text + Deine_Ergänzung);					


Oder willst du den Inhalt von Edit1.Text in eine Datei schreiben?
grayfox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 800

win98, winXP
D4 Standard; D6 Personal
BeitragVerfasst: Do 30.09.04 11:20 
hallo spreemy!

Zitat:
Wie kann ich per Buttonclick aus einem edit eine txt Datei erstellen lassen?


indem du in die OnClick-procedure des buttons die routine zum erstellen der txt-datei einträgst.
stichwort: 'AssignFile, Reset, Rewrite, Append, CloseFile'
bzw TStrings.SaveToFile

ein tipp von mir: such in den alten beiträgen im forums - viele user vor dir hatten genau dieselben bzw ähnliche anfragen

mfg, stefan
Spreemy Threadstarter
Hält's aus hier
Beiträge: 10

Win XP
D7 Prof
BeitragVerfasst: Do 30.09.04 12:34 
danke hat geklappt!
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Do 30.09.04 12:49 
Nu würde mich denn doch noch interessieren, was du machen wolltest. :wink: