Autor Beitrag
hansg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 168

Win XP Professional SP3, Vista Ultimate 32 SP1
Delphi 6 Professional
BeitragVerfasst: Mi 08.01.03 19:59 
Hallo zusammen,wer hilft nem Newbie?
Ich möchte folgendes machen.


Wenn ich einen Opendialog schließe soll der Inhalt der markierten Datei (Textdatei) in einem Richedit angezeigt werden.

Habe schon in der Hilfe bzw. hier gesucht, bin aber zu blöd das hinzu kriegen.

Wer hilft?

Danke Hans
Popov
Gast
Erhaltene Danke: 1



BeitragVerfasst: Mi 08.01.03 20:14 
ausblenden Quelltext
1:
2:
3:
if OpenDialog1.Execute then begin
  RichEdit1.Lines.Add(OpenDialog1.FileName);
end;


Ungeprüft aus dem Kopf
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Mi 08.01.03 20:20 
Hallo

Zitat:

soll der Inhalt der markierten Datei

wenn du den Dateiinhalt haben möchtest nimm loadfromfile
ausblenden Quelltext
1:
  if opendialog1.execute then Richedit1.lines.LoadFromFile(opendialog1.FileName);					


Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
hansg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 168

Win XP Professional SP3, Vista Ultimate 32 SP1
Delphi 6 Professional
BeitragVerfasst: Mi 08.01.03 20:57 
Hallo :) danke für die Hilfe,
soweit war ich auch schon, der Fehler war das ich nicht wußte wo ich
den Befehl aufrufen musste.
Ich dachte immer bei OnClose vom Dialog, richtig wäre beim Aufruf des Dialogs.


Danke für die schnelle Hilfe
Hans