zoukankan      html  css  js  c++  java
  • AlertWindowManager 弹出提示窗口使用帮助(下)

    //显示消息提示框
    //function TdxAlertWindowManager.Show(const ACaption, AText: string; AImageIndex: TcxImageIndex = -1): TdxAlertWindow;
    //ACaption显示标题
    //AText消息内容
    //AImageIndex显示图片索引
    procedure TForm1.Button1Click(Sender: TObject);
    begin
      dxAlertWindowManager1.Show('消息提示框标题', '这里是消息内容,这里是消息内容!');
    end;
    //dxAlertWindowManager点击按钮事件
    procedure TForm1.dxAlertWindowManager1ButtonClick(Sender: TObject; AAlertWindow: TdxAlertWindow; AButtonIndex: Integer);
    begin
      if AButtonIndex = 0 then
        ShowMessage('Button1')
      else if AButtonIndex = 1 then
        ShowMessage('Button2')
      else if AButtonIndex = 2 then
        ShowMessage('Button3');
    end;
    procedure TForm1.Button1Click(Sender: TObject);
    begin
      dxAlertWindowManager1.Show('这里是标题','这里是内容');
      ShowMessage(IntToStr(
       // 获取目前打开的消息框个数,打开后数量加一,关闭后数量减一
      dxAlertWindowManager1.Count
      ));
    end;
    var
      AlertWindow: TdxAlertWindow;
    
    // 增加一条消息
    procedure TForm1.btnAppMsgClick(Sender: TObject);
    begin
      AlertWindow.BeginUpdate;
      AlertWindow.MessageList.Add('故乡(接上)', '故乡的面貌' + #13#10 + '却是那样一般惆怅的模样' + #13#10 + '仿佛迷雾里的招手', 0);
    //合并显示用AlertWindow.MessageList.Add()方法
    //如果独立显示消息提示框用dxAlertWindowManager1.Show()方法 AlertWindow.EndUpdate;
    end; // 显示一条消息,并设置高度宽度自适应 procedure TForm1.btnShowMsgClick(Sender: TObject); begin dxAlertWindowManager1.OptionsSize.AutoHeight := True; dxAlertWindowManager1.OptionsSize.AutoWidth := True; AlertWindow := dxAlertWindowManager1.Show('故乡', '故乡的月' + #13#10 + '是一把炽热的火' + #13#10 + '总会在寒蝉凄切的夜' + #13#10 + '释放出舒心的暖', 1); end;

    消息显示效果如下

  • 相关阅读:
    Function overloading and return type
    Function overloading and const keyword
    Function Overloading in C++
    web安全测试相关内容(三)
    web安全测试相关内容(二)
    web安全测试相关内容(一)
    CDNDrive 第一个版本发布 & 布客新知第二次备份完成
    PyTorch 1.4 中文文档校对活动正式启动 | ApacheCN
    布客·ApacheCN 编程/大数据/数据科学/人工智能学习资源 2020.2
    计算机电子书 2019 BiliDrive 备份
  • 原文地址:https://www.cnblogs.com/liessay/p/7113604.html
Copyright © 2011-2022 走看看