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;

    消息显示效果如下

  • 相关阅读:
    [BZOJ3751] [NOIP2014] 解方程 (数学)
    [BZOJ4198] [Noi2015] 荷马史诗 (贪心)
    [BZOJ4034] [HAOI2015] T2 (树链剖分)
    [BZOJ1880] [Sdoi2009] Elaxia的路线 (SPFA & 拓扑排序)
    [BZOJ1088] [SCOI2005] 扫雷Mine
    [BZOJ1004] [HNOI2008] Cards (Polya定理)
    [BZOJ1009] [HNOI2008] GT考试 (KMP & dp & 矩阵乘法)
    [BZOJ1503] [NOI2004] 郁闷的出纳员 (treap)
    [BZOJ1059] [ZJOI2007] 矩阵游戏 (二分图匹配)
    BZOJ2626: JZPFAR
  • 原文地址:https://www.cnblogs.com/liessay/p/7113604.html
Copyright © 2011-2022 走看看