Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=80801 --- shadow/80801 2007-02-11 19:55:16.000000000 -0500 +++ shadow/80801.tmp.28066 2007-02-11 19:55:16.000000000 -0500 @@ -0,0 +1,39 @@ +Bug#: 80801 +Product: Mono: Class Libraries +Version: 1.2 +OS: other +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Cosmetic +Component: Windows.Forms +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: Label.PreferredHeight returns incorrect value after calling Application.SetCompatibleTextRenderingDefault + +Steps to reproduce the problem: +using System.Diagnostics; +using System.Windows.Forms; +class Test { + static void Main() { + Application.SetCompatibleTextRenderingDefault(false); + Label l = new Label(); + Debug.Assert(l.PreferredHeight == l.Font.Height); + l.BorderStyle = BorderStyle.Fixed3D; + Debug.Assert(l.PreferredHeight == l.Font.Height); + l.BorderStyle = BorderStyle.FixedSingle; + Debug.Assert(l.PreferredHeight == l.Font.Height); + } +} + +Additional Information: +Adding +#if NET_2_0 + if (use_compatible_text_rendering) +#endif +in Label.CalcPreferredHeight before the switch block seems to fix it. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
