码迷,mamicode.com
首页 > 移动开发 > 详细

XE7 Android 中使用 MessageDlg 范例

时间:2017-07-29 10:04:33      阅读:226      评论:0      收藏:0      [点我收藏+]

标签:color   exe   url   code   str   style   begin   android   form   

XE7 Android 中使用 MessageDlg 范例

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);
InputQuery(Input, [Name], [‘‘],
  procedure(const AResult: TModalResult; const AValues: array of string)
  begin
    if AResult = mrOk then
      Showmessage(AValues[0]);
  end);

更新:

下面代码 Android 实机没问题,但在 iOS 实机没有动作。

 

MessageDlg(Choose a button:, System.UITypes.TMsgDlgType.mtInformation, mbOKCancel, 0,
  procedure(const AResult: TModalResult)
  begin
       if AResult = mrOk then
          ShowShareSheetAction1.ExecuteTarget(Sender); // iOS 实机没有动作 (没有当机)
  end);

 

XE7 Android 中使用 MessageDlg 范例

标签:color   exe   url   code   str   style   begin   android   form   

原文地址:http://www.cnblogs.com/m0488/p/7253278.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!