Habe nach TButton Componenten gesucht und gefunden
Sieht dann so aus:
Delphi-Quellcode:
function ExtMessageDialog(const Msg: string; DlgType: TMsgDlgType;
Buttons: TMsgDlgButtons; Captions: array of string): Integer;
var
aMsgDlg: TForm;
i: Integer;
dlgButton: TButton;
CaptionIndex: Integer;
Left : Integer;
begin
aMsgDlg := CreateMessageDialog(Msg, DlgType, Buttons);
Left := Trunc(aMsgDlg.Width / 2) -80;
captionIndex := 0;
for i := 0 to aMsgDlg.ComponentCount - 1 do
begin
if (aMsgDlg.Components[i] is TButton) then
begin
dlgButton := TButton(aMsgDlg.Components[i]);
if CaptionIndex > High(Captions) then Break;
dlgButton.Width := 75;
dlgButton.Left := Left;
Left := Left + 80;
dlgButton.Caption := Captions[CaptionIndex];
Inc(CaptionIndex);
end;
end;
Result := aMsgDlg.ShowModal;
end;
habe die Anregung gefunden auf
www.swissdelphicenter.ch
Chris