[Mono-bugs] [Bug 81139][Cri] New - The mainmenu is not getting rendered correctly when user draws the menu instead of OS to do so

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Mar 14 11:24:38 EDT 2007


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 kumar_chintapalli at semanticspace.com.

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

--- shadow/81139	2007-03-14 10:24:38.000000000 -0500
+++ shadow/81139.tmp.27229	2007-03-14 10:24:38.000000000 -0500
@@ -0,0 +1,61 @@
+Bug#: 81139
+Product: Mono: Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Critical
+Component: io-layer
+AssignedTo: dick at ximian.com                            
+ReportedBy: kumar_chintapalli at semanticspace.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: The mainmenu is not getting rendered correctly when user draws the menu instead of OS to do so
+
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem:
+
+
+Steps to reproduce the problem:
+1. Put a main menu in a windows form 
+2. Put the ownerdraw property of a menu item in the main menu to the 
+true  
+3. and in the event menuItem1.DrawItem+=new DrawItemEventHandler
+(menuItem1_DrawItem) write teh following code
+
+private void menuItem1_DrawItem(object sender, DrawItemEventArgs e)
+		{
+Rectangle r1 =new Rectangle
+(e.Bounds.X,e.Bounds.Y,e.Bounds.Width+20,e.Bounds.Height);
+
+  Brush b1=new SolidBrush(Color.SkyBlue);
+Brush b2=new SolidBrush(Color.Brown);
+System.Drawing.Font f1= new Font 
+(System.Drawing.FontFamily.GenericMonospace,(float)1);    
+			StringFormat s1=new StringFormat
+(StringFormat.GenericDefault);   
+			e.Graphics.DrawString("FILE",f1,b2,r1,s1);
+			
+						e.Graphics.DrawRectangle
+(new Pen((Brush)b1),r1);
+			e.Graphics.FillRectangle(b1,r1); 
+					
+			  
+		}
+
+Actual Results:
+
+the menu item is not getting drawn.
+
+Expected Results:
+the menu item should be drawn.
+
+How often does this happen? 
+every time
+
+Additional Information:


More information about the mono-bugs mailing list