[Mono-bugs] [Bug 69738][Nor] New - Redraw problem when a window is too small

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 20 Nov 2004 06:45:43 -0500 (EST)


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 paul@all-the-johnsons.co.uk.

http://bugzilla.ximian.com/show_bug.cgi?id=69738

--- shadow/69738	2004-11-20 06:45:43.000000000 -0500
+++ shadow/69738.tmp.9995	2004-11-20 06:45:43.000000000 -0500
@@ -0,0 +1,90 @@
+Bug#: 69738
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: Fedora Core 3 (rawhide)
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: paul@all-the-johnsons.co.uk               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Redraw problem when a window is too small
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+If a window is too small for the fonts to fit into, nothing is displayed
+until the window is made larger
+
+Steps to reproduce the problem:
+1. Compile and run the test case below
+2. 
+3. 
+
+Actual Results:
+The window is blank until made larger. There is no error feedback given.
+
+Expected Results:
+The text should be displayed
+
+How often does this happen? 
+Always
+
+Additional Information:
+Using MWF checked out from svn at about 3pm GMT 19.11.04
+
+Test case:
+using System;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.Data;
+
+public class UsingFonts : System.Windows.Forms.Form
+{
+	private System.ComponentModel.Container components = null;
+
+	[STAThread]
+	static void Main()
+	{
+		Application.Run (new UsingFonts() );
+	}
+	
+	protected override void OnPaint(PaintEventArgs paintEvent)	
+	{
+		Graphics graphicsObject = paintEvent.Graphics;
+		SolidBrush brush = new SolidBrush (Color.DarkBlue);
+		
+		FontStyle style = FontStyle.Bold;
+		Font arial = new Font (new FontFamily ("Ariel"), 12, style);
+		
+		style = FontStyle.Regular;
+		Font timesNewRoman = new Font ("Times New Roman", 12, style);
+		
+		style = FontStyle.Bold | FontStyle.Italic;
+		Font courierNew = new Font("Courier New", 16, style);
+		
+		style = FontStyle.Strikeout;
+		Font tahoma = new Font("Tahoma", 18, style);
+		
+		graphicsObject.DrawString(arial.Name + " 12 point bold.", arial, 
+			brush, 10, 10);
+			
+		graphicsObject.DrawString(timesNewRoman.Name + " 12 point plain.",
+			timesNewRoman, brush, 10, 30);
+		
+		graphicsObject.DrawString(courierNew.Name + " 16 point bold and italic.", 
+			courierNew, brush, 10, 54);
+		
+		graphicsObject.DrawString(tahoma.Name + " 18 point strikeout", tahoma,
+			brush, 10, 75);
+		
+	}
+}