• 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;

    消息显示效果如下

  • 相关阅读:
    MySQL查询优化
    MySQL主从复制与主主复制
    MySQL常用语句
    MySQL数据类型--日期时间
    制作类似ThinkPHP框架中的PATHINFO模式功能(二)
    制作类似ThinkPHP框架中的PATHINFO模式功能
    Smarty的基本使用与总结
    PHP与API讲解(一)
    PHP中遍历XML之SimpleXML
    submit text3常用快捷键
  • 原文地址:https://www.cnblogs.com/liessay/p/7113604.html
Copyright © 2020-2023  润新知