Autor Beitrag
CyberStorm
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33

WIN 98, WIN XP
D4 Prof, D6 Pers
BeitragVerfasst: Fr 28.06.02 23:27 
Hi,

Wie kann ich mehere Dateien über einen OpenDialog öffnen und in einer ListBox abspeichern.

mfg
CyberStorm
cbs
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 207
Erhaltene Danke: 1



BeitragVerfasst: Fr 28.06.02 23:55 
Tag auch

mit der Eigenschaft Options[...,ofAllowMultiSelect,...] kann der user mehrere files auswählen (einfach im objektinspektor auf true setzen). die Dateien findest du in der eigenschaft Files vom typ TStrings. dort sind alle Dateiens (mit pfad) aufgelistet die der user ausgewählt hat (für jede Zeile ein Pfad). die zuletzt ausgewählte Datei steht dabei in zeile 1 (also Files[0] dieser eintrag entspricht dabei automatisch der eigenschaft FileName)
ausblenden Quelltext
1:
ListBox1.Items.AddStrings(OpenDialog1.Files);					
Arakis
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 344



BeitragVerfasst: Fr 28.06.02 23:57 
Im Objekt-Inspektor "Options" erweitern und "ofAllowMultiSelect" auf true stellen. Abfragen tust du diese mit openDialog1.Files
Das ist eine StringList. Also einfach ListBox1.Strings := openDialog1.Files.Strings

Bis dann
user defined image

_________________
Mit dem Computer löst man Probleme, die man ohne ihn nicht hätte.
Entwickler von SpaceTrek: The New Empire - Siehe Hompage!
CyberStorm Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33

WIN 98, WIN XP
D4 Prof, D6 Pers
BeitragVerfasst: Sa 29.06.02 00:09 
Hi

Danke für die schnelle Antwort.

Klappt jetzt :)

mfg