Delphi Android 询问框

http://community.embarcadero.com/blogs/entry/xe7-dialog-box-methods-support-anonymous-methods-to-handle-their-closing

MessageDlg('Choose a button:', System.UITypes.TMsgDlgType.mtInformation,
    [
      System.UITypes.TMsgDlgBtn.mbYes,
      System.UITypes.TMsgDlgBtn.mbNo,
      System.UITypes.TMsgDlgBtn.mbCancel
    ], 0,
    procedure(const AResult: TModalResult)
    begin
      if AResult = mrYES then
         ShowMessage('You chose Yes') else
      if AResult = mrNo then
         ShowMessage('You chose No') else
      if AResult = mrCancel then
         ShowMessage('You chose Cancel');
    end);

 

posted on 2015-09-30 14:17  lypzxy  阅读(385)  评论(0编辑  收藏  举报