إقتباس :في الحقيقة ليس لدي اجابة لسؤالك لكن يمكنك استعمال Messagebox فهي تتبع لغة النظام عكس MessageDlg التي تتبع لغة بيئة التطوير.
علبة الحوار تتبع النظام (Theme) وكذلك شكلها وشكل الأزرار...، أما النصوص فهي كثوابت في الملفات المصدرية للديلفي، تجدها حيث ذكر الأستاذ حفظ الله.
ويمكن تغييرها بمثل هذه الدالة:
PHP كود :
function MyMessageDialog(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; Captions: array of string): Integer; var aMsgDlg: TForm; i: Integer; dlgButton: TButton; CaptionIndex: Integer; begin { Create the Dialog } aMsgDlg := CreateMessageDialog(Msg, DlgType, Buttons); captionIndex := 0; { Loop through Objects in Dialog } for i := 0 to aMsgDlg.ComponentCount - 1 do begin { If the object is of type TButton, then } if (aMsgDlg.Components[i] is TButton) then begin dlgButton := TButton(aMsgDlg.Components[i]); if CaptionIndex > High(Captions) then Break; { Give a new caption from our Captions array} dlgButton.Caption := Captions[CaptionIndex]; Inc(CaptionIndex); end; end; Result := aMsgDlg.ShowModal; end;
procedure TForm1.Button1Click(Sender: TObject); begin if MyMessageDialog('How much...?', mtConfirmation, mbOKCancel, ['1', '2']) = mrOk then ShowMessage('"1" clicked') else ShowMessage('"2" clicked'); end;
أظن أن هناك مكون (للأستاذ عروة) يقوم بذلك.
بالتوفيق.