FMX.Dialogs
procedure ShowMsgYesNo;
begin
{ Show a multiple-button alert that triggers different code blocks according to
your input }
TDialogService.MessageDialog('Choose a button:', System.UITypes.TMsgDlgType.mtInformation,
[System.UITypes.TMsgDlgBtn.mbYes, System.UITypes.TMsgDlgBtn.mbNo],
System.UITypes.TMsgDlgBtn.mbYes, 0,
// Use an anonymous method to make sure the acknowledgment appears as expected.
procedure(const AResult: TModalResult)
begin
case AResult of
{ Detect which button was pushed and show a different message }
mrYES:
ShowMessage('You chose Yes');
mrNo:
ShowMessage('You chose No');
end;
end);
end;