更改TdxAlertWindowManager上的现有消息

时间:2012-10-27 13:57:59

标签: delphi devexpress alerts

我使用这样的代码来显示使用TdxAlertWindowManager的提醒。 这给了我一个警报窗口,在这个窗口中有几条消息。 我想要做的是显示一个带有第一行文本的警报窗口,并在同一个窗口中我想要一个新文本。 该程序用于将计算机连接到某些网络共享,我想要的消息如下:

Connecting drive y: to \\server\foldery
Connecting drive x: to \\server\folderx

以及其他股票等等。 但我无法弄清楚如何使用TdxAlertWindowManager

来做到这一点

几年前,当我制作这个程序时,我使用了Berg软件中的nxAlert,但我不再提供它了。在这方面,这样做没有问题。

if fAlertWindow = nil then
  dxAlertWindowManager.Show(sHpAlertCaption, AlertText, fIndex).Tag := 1
else
  begin
    fAlertWindow.MessageList.Add(sHpAlertCaption, AlertText, fIndex);
    fAlertWindow.RestartDisplayTimer;
  end;

1 个答案:

答案 0 :(得分:1)

我不知道如何让TdxAlerWindowManager显示新行,但我知道如何更改当前消息。只需修改Items[0]的{​​{1}}属性即可。我是在计时器中做的。

MessageList

100%工作