2

在拉撒路我有这个代码:

MessageDlg('HRS: Data error!.',
       'Either the system is not properly configured or you have an error' + chr(13) +
       'that requires expert assistance. This may be due to several reasons like' + chr(13) +
       'bad hardware, tampering, etc. Please contact Marha Online or your admin.' + chr(13) +
       'Please do not continue to use the HRS software until it is fixed.', mtInformation, [mbOK], 0);

输出是这样的:

在此处输入图像描述

我正在使用 chr(13) 换行,但正如您所见,其他地方的行也被换行了。我也担心这将如何在 Windows 上显示...顺便说一句,我使用的是 Ubuntu。

有没有办法控制这个盒子的大小或绕过它?谢谢!

4

1 回答 1

1

In a word, no, there's no way you can control the size of a MessageDlg. By design, MessageDlg and friends are meant to behave in pretty much a standarrd way.

Although I'm guessing you already thought about it, a way around it would be to simply create your own. That way you would have much more control over it than just its size.

And a side note: I would place LineEndings only on paragraph endings. These dialogs try to adjust to their content, so I guess it's the only way they'd play nice... JMHO.

于 2013-10-10T14:50:13.490 回答