[Mono-bugs] [Bug 80451][Nor] Changed - Transparent control is not displayed properly

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Jan 18 03:25:29 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.

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

--- shadow/80451	2007-01-17 19:46:09.000000000 -0500
+++ shadow/80451.tmp.19891	2007-01-18 03:25:29.000000000 -0500
@@ -1,13 +1,13 @@
 Bug#: 80451
 Product: Mono: Class Libraries
 Version: 1.2
 OS: other
 OS Details: 
-Status: RESOLVED   
-Resolution: FIXED
+Status: REOPENED   
+Resolution: 
 Severity: Unknown
 Priority: Normal
 Component: Windows.Forms
 AssignedTo: monkey at jpobst.com                            
 ReportedBy: georgegiolfan at yahoo.com               
 QAContact: mono-bugs at ximian.com
@@ -54,6 +54,38 @@
 
 ------- Additional Comments From monkey at jpobst.com  2007-01-17 19:46 -------
 If the control has a transparent background, we need to refresh it
 when it moves and when it's parent's background image changes.
 
 Fixed in r71236.
+
+------- Additional Comments From georgegiolfan at yahoo.com  2007-01-18 03:25 -------
+The test works now. However, the documentation for 
+ControlStyles.SupportsTransparentBackColor says it should work for 
+any color with alpha less than 255.
+Here is a new test.
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+class TestForm : Form {
+    static void Main() {
+        Application.Run(new TestForm());
+    }
+    public TestForm() {
+        BackgroundImage = Icon.ToBitmap();
+        TransparentControl c = new TransparentControl();
+        c.BackColor = Color.FromArgb(200, Color.Red);
+        c.Width = 100;
+        c.Dock = DockStyle.Right;
+        Controls.Add(c);
+    }
+    protected override void OnClick(EventArgs e) {
+        base.OnClick(e);
+        BackgroundImage = null;
+    }
+    class TransparentControl : Control {
+        public TransparentControl() {
+            SetStyle(ControlStyles.SupportsTransparentBackColor, 
+true);
+        }
+    }
+}


More information about the mono-bugs mailing list