在Lazarus上,我有这样的代码:
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。
有没有办法控制这个盒子的大小或者绕过它?谢谢!
发布于 2013-10-10 22:50:13
一言以蔽之,没有办法控制MessageDlg的大小。从设计上讲,MessageDlg和朋友的行为方式几乎是标准的。
虽然我猜你已经考虑过了,但一种绕过它的方法是简单地创建你自己的。这样一来,你不仅可以控制它的大小,还可以更好地控制它。
附注:我只将LineEndings放在段落末尾。这些对话框试图调整它们的内容,所以我想这是他们玩得好的唯一方式……JMHO。
https://stackoverflow.com/questions/18701729
复制相似问题