FMX.Platform.IFMXDialogServiceSync.MessageDialogSync
Delphi
function MessageDialogSync(const AMessage: string; const ADialogType: TMsgDlgType; const AButtons: TMsgDlgButtons; const ADefaultButton: TMsgDlgBtn; const AHelpCtx: THelpContext): Integer;
C++
virtual int __fastcall MessageDialogSync(const System::UnicodeString AMessage, const System::Uitypes::TMsgDlgType ADialogType, const System::Uitypes::TMsgDlgButtons AButtons, const System::Uitypes::TMsgDlgBtn ADefaultButton, const System::Classes::THelpContext AHelpCtx) = 0 ;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | FMX.Platform.pas FMX.Platform.hpp |
FMX.Platform | IFMXDialogServiceSync |
Description
Displays a dialog box with a custom message, dialog type, set of buttons and help context ID.
MessageDialogSync works synchronously. Calls to MessageDialogSync finish only when the user closes the dialog box. To work asynchronously, use IFMXDialogServiceAsync.MessageDialogAsync.
MessageDialogSync receives the following parameters:
AMessage
is the text message.ADialogType
is the dialog type.AButtons
is the set of buttons.ADefaultButton
is the button that has the focus by default.AHelpCtx
is the help context ID.
MessageDlg returns the value of the button that the user selected.
- Note: The Help button does not return a value because it does not close the dialog box.
To call MessageDialogSync without the need of an instance of IFMXDialogServiceSync, use TDialogServiceSync.MessageDialog instead.
Platform Support
Platform | Support |
---|---|
Windows | |
OS X | |
iOS | |
Android |
See Also
- FMX.Platform.IFMXDialogServiceSync.InputQuerySync
- FMX.Platform.IFMXDialogServiceSync.ShowMessageSync
- FileExists (Delphi) code example
- TStringBuilderClickCount (Delphi) code example
- FileExists (C++) code example
- TStringBuilderClickCount (C++) code example
- FMX.MessageAlerts sample application