[Mono-bugs] [Bug 80553][Nor] New - ToolBar with flat appearance not rendered correctly

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Jan 18 18:42:13 EST 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 georgegiolfan at yahoo.com.


--- shadow/80553	2007-01-18 18:42:13.000000000 -0500
+++ shadow/80553.tmp.2611	2007-01-18 18:42:13.000000000 -0500
@@ -0,0 +1,66 @@
+Bug#: 80553
+Product: Mono: Class Libraries
+Version: 1.2
+OS: Windows XP
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com                            
+ReportedBy: georgegiolfan at yahoo.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: ToolBar with flat appearance not rendered correctly
+Description of Problem:
+A ToolBar with Appearance = ToolBarAppearance.Flat is not rendered 
+Steps to reproduce the problem:
+1. Compile and run the following program.
+using System;
+using System.Windows.Forms;
+class TestForm : Form {
+    static void Main() {
+        Application.Run(new TestForm());
+    }
+    public TestForm() {
+        AddToolBar();
+        AddToolBar();
+    }
+    void AddToolBar() {
+        ToolBar t = new ToolBar();
+        t.BorderStyle = BorderStyle.FixedSingle;
+        t.Appearance = ToolBarAppearance.Flat;
+        Controls.Add(t);
+    }
+    protected override void OnClick(EventArgs e) {
+        base.OnClick(e);
+        BackgroundImage = Icon.ToBitmap();
+    }
+2. Click on the unoccupied window client area.
+3. Resize the window.
+Actual Results:
+The background of the toolbars is not updated on click, and resizing 
+causes only invalidated regions to be painted with the background image.
+Expected Results:
+ToolBar works like on Microsoft .NET Framework (ideal), or at least it is 
+painted and invalidated properly.
+How often does this happen? 
+Always (on the SVN version).
+Additional Information:
+The implementation in ThemeWin32Classic is pretty close, however on 
+Microsoft .NET Framework it works differently (see http://
+the part about WM_ERASEBKGRND). It becomes obvious if the location of the 
+toolbar is not 0, 0 (or a multiple of the size of the background image).

More information about the mono-bugs mailing list