FMX.Platform.IFMXDialogServiceAsync.MessageDialogAsync
Delphi
procedure MessageDialogAsync(const AMessage: string; const ADialogType: TMsgDlgType; const AButtons: TMsgDlgButtons; const ADefaultButton: TMsgDlgBtn; const AHelpCtx: LongInt; const ACloseDialogProc: TInputCloseDialogProc); overload;
procedure MessageDialogAsync(const AMessage: string; const ADialogType: TMsgDlgType; const AButtons: TMsgDlgButtons; const ADefaultButton: TMsgDlgBtn; const AHelpCtx: LongInt; const ACloseDialogEvent: TInputCloseDialogEvent; const AContext: TObject = nil); overload;
C++
virtual void __fastcall MessageDialogAsync(const System::UnicodeString AMessage, const System::Uitypes::TMsgDlgType ADialogType, const System::Uitypes::TMsgDlgButtons AButtons, const System::Uitypes::TMsgDlgBtn ADefaultButton, const int AHelpCtx, const Fmx::Dialogs::_di_TInputCloseDialogProc ACloseDialogProc) = 0 /* overload */;
virtual void __fastcall MessageDialogAsync(const System::UnicodeString AMessage, const System::Uitypes::TMsgDlgType ADialogType, const System::Uitypes::TMsgDlgButtons AButtons, const System::Uitypes::TMsgDlgBtn ADefaultButton, const int AHelpCtx, const Fmx::Dialogs::TInputCloseDialogEvent ACloseDialogEvent, System::TObject* const AContext = (System::TObject*)(0x0)) = 0 /* overload */;
Inhaltsverzeichnis
Eigenschaften
| Typ | Sichtbarkeit | Quelle | Unit | Übergeordnet |
|---|---|---|---|---|
procedure function |
public | FMX.Platform.pas FMX.Platform.hpp |
FMX.Platform | IFMXDialogServiceAsync |
Beschreibung
Zeigt ein Dialogfeld mit einer benutzerdefinierten Meldung, einem Dialogfeldtyp, einer Gruppe von Schaltflächen und der Hilfekontext-ID an.
MessageDialogAsync arbeitet asynchron. Aufrufe von MessageDialogAsync werden unmittelbar beendet, sie warten nicht bis der Benutzer das Dialogfeld geschlossen hat. Verwenden Sie IFMXDialogServiceSync.MessageDialogSync, um synchron zu arbeiten.
MessageDialogAsync erhält die folgenden Parameter:
AMessageist die Textmeldung.ADialogTypeist der Dialogfeldtyp.AButtonsist die Gruppe von Schaltflächen.ADefaultButtonist die Schaltfläche, die den Fokus standardmäßig hat.AHelpCtxist die Hilfekontext-ID.ACloseDialogProcoderACloseDialogEventist eine anonyme Methode oder Ereignisbehandlungsroutine, die aufgerufen wird, nachdem der Benutzer das Dialogfeld geschlossen hat.- Hinweis: Die Schaltfläche Hilfe löst keinen Aufruf aus, weil sie das Dialogfeld nicht schließt.
AContextist ein optionales Objekt, das Sie als Kontext für dieACloseQueryEventzugewiesene Ereignisbehandlungsroutine bereitstellen können.
Wenn der Benutzer das Dialogfeld schließt, ruft MessageDialogAsync die angegebene anonyme Methode oder Ereignisbehandlungsroutine mit den folgenden Argumenten auf:
Sender(nurACloseDialogEvent) enthält den angegebenen ParameterAContext.AResultist der Wert der Schaltfläche für modale Ergebnisse zum Schließen des Dialogfeldes.
Verwenden Sie stattdessen TDialogServiceAsync.MessageDialog, um MessageDialogAsync aufzurufen, ohne dass eine Instanz von IFMXDialogServiceAsync erforderlich ist.
Plattformunterstütztung
| Plattform | Unterstützung |
|---|---|
| Windows | |
| OS X | |
| iOS | |
| Android |
Siehe auch
- FMX.Platform.IFMXDialogServiceAsync.InputQueryAsync
- FMX.Platform.IFMXDialogServiceAsync.ShowMessageAsync
- FileExists (Delphi) (Codebeispiel)
- TStringBuilderClickCount (Delphi) (Codebeispiel)
- FileExists (C++) (Codebeispiel)
- TStringBuilderClickCount (C++) (Codebeispiel)
- FMX.MessageAlerts (Beispielanwendung)