Bugzilla – Bug 343364
MessageBox: Show() does not display OK button for large message
Last modified: 2008-05-05 14:16:03 UTC
To reproduce, execute the line of code: MessageBox.Show(new StringBuilder().Insert(0,"aa ",1000).ToString()); Observed: Ok button does not appear Expected: OK button should appear. MONO 1.2.6 preview 2 .NET 2 profile Windows XP 640x480 screen resolution
Created attachment 184365 [details] if it's just the visiblity of buttons u wanted, here's the patch. however this doesnot rectify the problem. i'm working on it
Created attachment 184376 [details] somthing wrong with the previous one.. try this instead
Created attachment 184474 [details] Alternative solution Your patch looks to be very complex, a better and more simple approach is to use parameter width of TextRenderer.MeasureString, this patch use it, with one line of code we can calculate mas size based on 60% of screen width. This patch also need more changes to draw text correct, for this I will attach a final patch. Probably we will need to use a Rectangle parameter in DrawString to limit the width area when drawing text. Patch coming soon.
Patch commited to SVN r90215.
The SVN r90216 fixed remaining issues.
Everaldo, the line wrapping does not appear to work on Linux. Works fine on Win32 though.
After r90216 it works on Linux, I use Linux and it works fine here. Maybe you tested before 90216.
Still get the same result (using Ubuntu).
Could you please provide an screenshot? For me it works really fine. What version of Ubuntu you use?
7.10 (Gutsy Gibson). I'll attach a screenshot later today.
I installed one ubuntu Vm, tested it and also works for me. I will mark as NEEDINFO because I cant reproduce it after my fixes. Please give us an screenshot or more details if problem still remain for you.
You entered wrong info provider email. Please enter Gert as info provider.
Created attachment 191262 [details] Screenshot (Ubuntu 7.10)
Created attachment 191263 [details] Screenshot (Mono - Windows XP)
Created attachment 191264 [details] Screenshot (.NET - WinXP)
Everaldo: do you actually get other results? Note: There's still a horizontal spacing difference between Mono and .NET on Windows XP.
In r93577 I just fixed the right border and now it looks exactly like in .NET. I tested in Mono Win32, Mono opensuse 10.3 and Mono Ubuntu 7.10 and in all environments it looks ok.
Created attachment 191407 [details] My Linux screenshot This is my screenshot, everything looks fine.
Gert, Are you sure that you have last Mono and Libgdiplus, I am sure that I already fixed this problem and it works for me in all environments.
Ah, finally I found it, your sample code on report is: MessageBox.Show(new StringBuilder().Insert(0,"aa ",1000).ToString()); and you are running screenshots maybe using: MessageBox.Show(new StringBuilder().Insert(0,"aa",1000).ToString()); Small difference take get different results.
My mistake, the code I use does indeed not insert a blank: MessageBox.Show (new String ('a', 1000), "bug #343364");
Ok. I am moving from WinForms to libgdiplus because it is an issue with Measure and Draw functions in libgdiplus. On Win32 if you make a long string with no space between chars it break in some line, on Linux it dont happens.
*** This bug has been marked as a duplicate of bug 327039 ***