![]() |
Drag & Drop für Ordner
Hallo,
ich habe eine normale Drag & Drop funktion womit ich Dateien in mein Programm ziehen kann, nun möchte ich aber einen Ordner auf mein Programm ziehen und dann sollen alle Dateien in meine Listbox aus dem Ordner geschrieben werden, wie bekomme ich das hin das bei einem Ordner alle Dateien gelistet werden? |
Re: Drag & Drop für Ordner
Probiers mal so:
Delphi-Quellcode:
Die Funktion BuildFileList kommt aus der Unit JclFileUtils (Jedi3)
procedure TForm1.JvDragDrop1Drop(Sender: TObject; Pos: TPoint;
Value: TStrings); var i : Integer; begin for i:=0 to Value.Count-1 do begin if (DirectoryExists(Value[i])) then BuildFileList(IncludeTrailingPathDelimiter(Value[i])+'*.*',faAnyFile,Listbox1.Items); end; end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 02:47 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz