Autor Beitrag
MOEDI
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 52



BeitragVerfasst: Sa 28.10.06 16:31 
Einen wunderschönen guten Abend.
Ich hab folgendes Problem:
Ich hab ein Programm mit einer schicken Combobox, in welche nun alle, in einen Ordner gespeicherten Textdateinamen eingelesen werden sollen.
Wenn man dann auf ein Item klickt, soll der Inhalt der Textdatei (z.b. in ein Memofeld) eingelesen werden...
Hat einer 'ne Idee wie ich das anstellen kann?
Gruß
MOEDI
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Sa 28.10.06 16:43 
Wo liegt dein Problem, das Einlesen der Dateinamen? Herauskriegen was ausgewählt wurde? Laden in Memo?

_________________
Markus Kinzler.
Coder
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1383
Erhaltene Danke: 1

WinXP
D2005 PE
BeitragVerfasst: Sa 28.10.06 16:48 
Wie man Ordner ausliest steht schon im Forum.
Das angeklickte Item bekommst du mit ItemIndex.
Bemüh dazu mal die Delphi Hilfe.

MfG
MOEDI Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 52



BeitragVerfasst: Sa 28.10.06 16:49 
Ja.
Er soll selbständig alle Textdateien aus einem Ordner finden und dann die Dateinamen einlesen. Das ist mein erstes Problem, ich weiß nicht wie das geht.
Dann soll er, sobald man auf einen Dateinamen im Combobox-Feld klickt,
den entsprechenden Dateiinhalt in ein Memofeld laden. Womit wir beim 2. Problem wären... :-), Wie kann man das umsetzen?
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Sa 28.10.06 16:52 
zu. 1.) Schau mal nach .FindFirst, .FindNext.
zu 2.) Siehe Antwort user profile iconCoder
zu 3.) Memo.LoadFromFile()

_________________
Markus Kinzler.
MOEDI Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 52



BeitragVerfasst: Sa 28.10.06 16:56 
Danke euch.
Ich geh dann mal und probiers aus.
Sollts aus irgendeinem Grund nicht klappen, komm ich halt wieder angekrochen :-)
CU