zoukankan      html  css  js  c++  java
  • unigui ShowModal、MessageDlg

    procedure Calback(Sender: TComponent; AResult: Integer);
    procedure TForm.Calback(Sender: TComponent; AResult: Integer);
    begin
      case AResult of
        mrYes:
          begin

          end;
        mrNo:
          begin

          end;
      end;
    end;

     //fomr窗体不需要代码创建 如下会报错

    var
      F_Envcategory: TF_Envcategory;
    begin
      F_Envcategory := TF_Envcategory.Create(self);
      F_Envcategory.ShowModal(Calback);

      FreeAndNil(F_Envcategory);

    //直接调用
      F_Form.ShowModal(Calback);

       

    //-------------------------------------------------

    Form.ShowModal(
             procedure(Sender: TComponent; Res: integer)
              begin
                      case Res of
                            mrYes :
                            begin
                              UniEdit1.Text:='1';
                            end;
                            mrNo :
                            begin
                              UniEdit1.Text:='0';
                            end;
                      end;

              end

     );


     
     ModalResult := mrYes;
     ModalResult := mrNo;

    ------------------------------------

     MessageDlg('是否?', mtConfirmation, mbOKCancel,
        procedure(Sender: TComponent; Res: Integer)
        begin
          if Res = mrOk then
          begin
             
            end
            else
            begin
             
            end;

          end;
        end);
    ---------------------
    作者:ozhy111
    来源:CSDN
    原文:https://blog.csdn.net/ozhy111/article/details/83148923
    版权声明:本文为博主原创文章,转载请附上博文链接!

  • 相关阅读:
    BZOJ3578:GTY的人类基因组计划2(集合hash,STL)
    【BZOJ 1022】 [SHOI2008]小约翰的游戏John
    【BZOJ 1295】 [SCOI2009]最长距离
    【BZOJ 1103】 [POI2007]大都市meg
    【BZOJ 3172】 [Tjoi2013]单词
    【BZOJ 1067】 [SCOI2007]降雨量
    【BZOJ 1491】 [NOI2007]社交网络
    【BZOJ 1087】[SCOI2005]互不侵犯King
    【BZOJ 1009】 [HNOI2008]GT考试
    【BZOJ 1053】[HAOI2007]反素数ant
  • 原文地址:https://www.cnblogs.com/westsoft/p/10674635.html
Copyright © 2011-2022 走看看