FMX.DialogService.TDialogService.ShowMessage

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

class procedure ShowMessage(const AMessage: string); overload;
class procedure ShowMessage(const AMessage: string; const ACloseDialogProc: TInputCloseDialogProc); overload;
class procedure ShowMessage(const AMessage: string; const ACloseDialogEvent: TInputCloseDialogEvent;
const AContext: TObject = nil); overload;

C++

__classmethod void __fastcall ShowMessage(const System::UnicodeString AMessage)/* overload */;
__classmethod void __fastcall ShowMessage(const System::UnicodeString AMessage, const Fmx::Dialogs::_di_TInputCloseDialogProc ACloseDialogProc)/* overload */;
__classmethod void __fastcall ShowMessage(const System::UnicodeString AMessage, const Fmx::Dialogs::TInputCloseDialogEvent ACloseDialogEvent, System::TObject* const AContext = (System::TObject*)(0x0))/* overload */;

Properties

Type Visibility Source Unit Parent
procedure
function
public
FMX.DialogService.pas
FMX.DialogService.hpp
FMX.DialogService TDialogService

Description

Shows a dialog box with the specified message and an OK button. .

ShowMessage can work synchronously or asynchronously depending on the preferred mode. ShowMessage internally calls ShowMessageAsync or ShowMessageSync.

When PreferredMode is set to Platform:

  • On desktop platforms (Windows and OS X), ShowMessage behaves synchronously. The call finishes only when the user closes the dialog box.
  • On mobile platforms (Android and iOS), ShowMessage behaves asynchronously. The call finishes instantaneously, it does not wait for the user to close the dialog box.

To force a specific behaviour for the different platforms, set PreferredMode to Sync or ASync (Not supported by Android).

ShowMessage receives the following parameters:

See Also