Show: Delphi C++
Display Preferences

FMX.Platform.IFMXDialogServiceAsync.MessageDialogAsync

From RAD Studio API Documentation
Jump to: navigation, search

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 */;

Properties

Type Visibility Source Unit Parent
procedure
function
public
FMX.Platform.pas
FMX.Platform.hpp
FMX.Platform IFMXDialogServiceAsync

Description

Displays a dialog box with a custom message, dialog type, set of buttons and help context ID.

MessageDialogAsync works asynchronously. Calls to MessageDialogAsync finish instantaneously, they do not wait for the user to close the dialog box. To work synchronously, use IFMXDialogServiceSync.MessageDialogSync.

MessageDialogAsync receives the following parameters:

When the user closes the dialog box, MessageDialogAsync calls the specified anonymous method or event handler with the following arguments:

  • Sender (ACloseDialogEvent only) contains the specified AContext.
  • AResult is the modal result value of the button used to close the dialog box.

To call MessageDialogAsync without the need of an instance of IFMXDialogServiceAsync, use TDialogServiceAsync.MessageDialog instead.

Platform Support

Platform Support
Windows
YesC++11Feature.png
OS X
YesC++11Feature.png
iOS
YesC++11Feature.png
Android
YesC++11Feature.png

See Also

Personal tools
In Other Languages
Previous Versions
Assistance