Autor Beitrag
Henry
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 619

WinXP Prof. SP3
D6 Prof.
BeitragVerfasst: Mo 09.09.02 21:51 
Hallo,

Ich habe da mal eine Frage zum OpenDialog.
Da dieser Dialog eigentlich optimal die Bedürfnisse meines Vorhabens
erfüllt, würde ich gern wissen ob es möglich ist den Button öffnen
umzubenennen.
Ich möchte den Dialog nämlich in diesem Fall nicht zum öffnen benutzen,
sondern das kopieren einer bestimmten (ausgewälten) Datei damit einleiten.
Funktioniert auch prima, nur die Bezeichnung Öffnen passt nicht so ganz :)

Danke im voraus.

_________________
mfg Henry
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Di 10.09.02 09:32 
Hallo,

ich hab hier mal ein kleines Beispiel. Ob das der "korrekte" Weg ist weiß ich nicht genau... sollte aber funktionieren. Folgenden Code in das OnShow-Event des OpenDialogs packen:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TForm1.OpenDialog1Show (Sender: TObject);
begin
  SendMessage (
      GetParent (OpenDialog1.Handle), 
      CDM_SETCONTROLTEXT, 
      IDOK,
      LongInt (pChar ('Kopieren'))
    );
end;

Die Unit CommDlg muss auch noch mit eingebunden werden!

Gruß
TINO
Henry Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 619

WinXP Prof. SP3
D6 Prof.
BeitragVerfasst: Di 10.09.02 14:44 
Ich Danke Dir.
Das sieht gut aus, ich werde es mal ausprobieren.

_________________
mfg Henry
Wolff68
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 302
Erhaltene Danke: 1

WinXP home
D6 Prof
BeitragVerfasst: Di 10.09.02 23:05 
Super. Hatte einen ähnlichen Fall, wo ich den Open-Dialog auch zum Anlegen einer Datei verwende.

Anstatt dem IDOK gibt es doch sicherlich noch andere Parameter zB für den Fenstertitel, oder?
Wo finde ich die denn? Leider spielt glaub meine Delphi-Hilfe verrückt. Ich bekomm nichtmal das SendMessage über F1 angezeigt :-( :evil:
Oder kannst mir den Parameter grad mal sagen?

Danke schonmal

_________________
"Der Mensch ist nicht was er sich vorstellt oder wünscht zu sein, sondern das was andere in ihm sehen."
Henry Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 619

WinXP Prof. SP3
D6 Prof.
BeitragVerfasst: Di 10.09.02 23:59 
Hi,

Ich weiß jetz aus dem kopf nich wie der heist.
Aber das giebt es doch im Objectinspektor.
Ich glaube ganz unten.

Ich hoffe das hilft.

_________________
mfg Henry
Henry Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 619

WinXP Prof. SP3
D6 Prof.
BeitragVerfasst: Mi 11.09.02 00:03 
Habe gerade nochmal nachgesehen.
Es ist:

ausblenden Quelltext
1:
OpenDialog1.Title := 'Das ist mein Fenster oder so'					


Ich hoffe das meinst Du.

_________________
mfg Henry
Henry Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 619

WinXP Prof. SP3
D6 Prof.
BeitragVerfasst: So 15.09.02 12:50 
@Tino

Konnte es leider erst jetzt probieren :( hat super funktioniert.

Danke nochmal

_________________
mfg Henry
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: So 15.09.02 21:37 
Henry hat folgendes geschrieben:
Konnte es leider erst jetzt probieren :( hat super funktioniert.


Das ist doch die Hauptsache!!

Gruß
TION