Autor Beitrag
Mindforce
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 358

Win XP Pro / MCE, Win 98, Slax (Linux)
Delphi 07 PRO, Delphi 3+7 (mit Prdx)
BeitragVerfasst: Di 06.06.06 15:34 
Hi,

ist es möglich einem OpenDialog zu sagen, das er einen Ordner auswählen soll, mit dem Button "Öffnen"???
Ich glaube man kann alles mit Delphi erreichen... :zwinker:

Sonst muss man eine Datei auswählen.

Gruss,

Mindforce

_________________
Our force; in mind.
SunnyDream
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36

WinXP
Delphi 7 Personal
BeitragVerfasst: Di 06.06.06 15:40 
Also meine Idee wäre es über den Filter zu probieren... Du kannst ja sagen welche Dateien angezeigt werden sollen bzw. welche erzeugt werden sollen (beim Save)... Vielleicht klappt es ja damit...

(war nur so ne Idee, will anstatt nur zu Fragen auch mal versuchen was Konstrutkives beizutragen)
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Di 06.06.06 15:42 
Unit FileCtrl einbinden und die Methode SelectDirectory benutzen.

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Di 06.06.06 15:42 
Ich habe mal gelesen das dies geht. Benutz mal die Foren-Suche. Ansonsten JvSelectDirectory von der Jedi VCL oder mal in den WinAPI-Tutorials von Luckie schauen, da war auch irgendwas drin (glaub ich :-) ).
Mindforce Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 358

Win XP Pro / MCE, Win 98, Slax (Linux)
Delphi 07 PRO, Delphi 3+7 (mit Prdx)
BeitragVerfasst: Di 06.06.06 16:08 
FileCtrl ist schon eingebunden... :zwinker:

Gruss,

Mindforce

_________________
Our force; in mind.
raiguen
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 374

WIN 2000prof, WIN XP prof
D7EP, MSSQL, ABSDB
BeitragVerfasst: Di 06.06.06 16:31 
user profile iconMarco D. hat folgendes geschrieben:
Unit FileCtrl einbinden und die Methode SelectDirectory benutzen.

Das war bzw ist die 'richtige' Antwort ;-)
Und so funktioniert das im Prinzip:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
procedure ButtonOKClick(Sender: TObject);
var StartVerz: WideString; 
    GewVerz: String;
begin
  StartVerz :=  ExtractFilePath(Application.ExeName); //--nur als Beispiel
  if SelectDirectory('Verzeichnis auswählen',  //--Text im Dialog
                      StartVerz,               //--Ausgangsverzeichnis, wenn leer, dann ist es Arbeitsplatz
                      GewVerz) then            //--vom Benutzer gewähltes Verzeichnis
    begin
      ShowMessage('gewählter Ordner: ' + GewVerz);
      {* mach sonst noch was *}
    end
  else
    ShowMessage('nix ausgewählt...');
end;