注册 登录
编程论坛 Delphi论坛

安卓下输入框报错求助

mp654k 发布于 2022-01-20 00:54, 1644 次点击
FMX.Dialogs.InputBox('请输入行高:', '填整数', '22');
这句代码报错
Blocking dialogs not implemented on this platform
On Android platform,only overloads with TinputCloseBoxProc or TinputCloseBoxEvent are supported.
2 回复
#2
nikotin2022-01-29 19:32
就是安卓下不支持模态对话框,不要这么使用模态框。
#3
mp654k2022-01-31 08:35
回复 2楼 nikotin
谢谢老大 我这样搞的
 InputBox('请输入行高:', '填整数', '22',
    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
            Heightstr := AValue;
          end;
        mrCancel:
          begin

          end;
      end;
    end);
1