如何诱导MessageBox.Show显示所有文本? [英] How do I induce MessageBox.Show to display all of the text?
问题描述
我在MessageBox.Show中看起来似乎是一个模糊的错误。我在Kubuntu Linux下使用Mono版本3.2.8,
。
以下C#程序演示了我尝试显示创建西班牙语
字典,只能成功显示创建西班牙语。单词Dictionary
丢失了。我调试的尝试如下:
我没有修补字体。
我在另一台Linux计算机上运行程序,相同结果。
如果任何字符v,x,y或z插入字符串中的任何位置,MessageBox.Show
会正确显示消息。
如果字符串转换为大写,MessageBox.Show将正确显示消息。这是程序:
I have what appears to be an obscure bug in MessageBox.Show. I'm using Mono version 3.2.8,
under Kubuntu Linux.
The following C# "program" demonstrates my attempt to display "Create Spanish
Dictionary", which only succeeded in displaying "Create Spanish". The word "Dictionary"
was missing. My attempts at debugging were as follows:
I did not tinker with Fonts.
I ran the program on another Linux computer, with identical results.
If any of the characters v, x, y, or z is inserted anywhere in the string, MessageBox.Show
displays the message correctly.
If the string is converted to uppercase, MessageBox.Show displays the message correctly. Here is the program:
// MsgTest.cs
using System;
using System.Drawing;
using System.Windows.Forms;
class MsgTest{
public static void Main(){
MessageBox.Show("Create Spanish Dictionary");
}
}
推荐答案
请查看BillWoodruff和我的问题的评论。
这是我的建议:由于Mono显然存在与此问题相关的缺陷(尽管尝试使用最新版本),您可以创建自己的模拟MessageBox
,基于类System.Windows.Forms.Form
。这不是太容易(如果你真的想要一个非常通用的组件,具有自我调整的布局),你将面临同样的缺陷,但是,与MessageBox
,您将对您的布局进行全面的细粒度控制;它将有助于解决这些缺陷。
-SA
Please see the comments to the question, by BillWoodruff and mine.
Here is my advice: as Mono apparently have defects related to the issue (try to use the latest version though), you can create your own analog ofMessageBox
, based on the classSystem.Windows.Forms.Form
. This is not too easy (if you really want to have a very universal component, with self-adjusting layout), and you will face no less defects, but, in contrast toMessageBox
, you will have full fine-grain control on your layout; it will help to work around those defects.
—SA
这篇关于如何诱导MessageBox.Show显示所有文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!