Autor Beitrag
Klaus D.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 63



BeitragVerfasst: Do 23.10.03 20:35 
Hallo

Warum komme ich mit folgender Zeile nicht an die Rückgabewerte meiner MessageDLGForm.
{ IF Sender is TButton (ButtonYes)then .......;}
Wie mach ich es denn besser ? :?:

Danke :(
Klaus Dabergott

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
MessageDLGForm := CreateMessageDialog ('Soll die Änderung des Datensatzes wirklich verworfen werden ?', mtWarning,mbYesNoCancel);
     ButtonYes := MessageDLGForm.FindComponent ('Yes');
      ButtonNo := MessageDLGForm.FindComponent ('No');
  ButtonCancel := MessageDLGForm.FindComponent ('Cancel');

If Assigned    (ButtonYes) and    (ButtonYes is tButton)and
   Assigned     (ButtonNo) and     (ButtonNo is tButton)and
   Assigned (ButtonCancel) and (ButtonCancel is tButton)
 Then

 TButton (ButtonYes).Caption    := 'Änderung verwerfen!';
 TButton (ButtonNo).Caption     := 'Weiß noch nicht!';
 TButton (ButtonCancel).Caption := 'Änderung doch speichern!';
                        .
                        .
                        .
  MessageDLGForm.ShowModal;


Moderiert von user profile iconTino: Delphi-Tags hinzugefügt.
Shark
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 87

98, XP
D3, D5, D7
BeitragVerfasst: Fr 24.10.03 09:14 
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
case MessageDlg('', mtConfirmation, [mbYes,mbNo,mbCancel], 0) of
mrYes:

...

end;


sonst wohl besser ein eigenes Form entwerfen
Klaus D. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 63



BeitragVerfasst: Fr 24.10.03 21:17 
Hallo
Danke für dein Bemühen.
Ich brauche aber die Rückgabewerte meiner MessageDLGForm da ich die Caption der Button's überschreiben muß.
Danke und Tschö Klaus