FMX版的對話框 Dialog 用法跟之前不同

雖然舊版的呼叫方式一樣可以用

但在手機上 跳出Dlg後就自動往下跑了 不會Hold在那裏等待

 

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

 

 

InputBox('What do you want to say?','','Stuff',
    procedure(const AResult: TModalResult; const AValue: string)
    begin
      case AResult of
        { Detect which button was pushed and show a different message }
        mrOk:
        begin
          // AValue is the result of the inputbox dialog
          showmessage(AValue);
        end;
        mrCancel:
        begin

        end;
      end;
    end
  );

arrow
arrow
    文章標籤
    Delphi FMX
    全站熱搜
    創作者介紹
    創作者 抓狂小白 的頭像
    抓狂小白

    抓狂小白的程式筆記

    抓狂小白 發表在 痞客邦 留言(0) 人氣()