https://bugzilla.novell.com/show_bug.cgi?id=328681

           Summary: OnPaint with double buffering goes wrong
           Product: Mono: Class Libraries
           Version: 1.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [EMAIL PROTECTED]
          Found By: ---


Description of Problem:
It seems that the OnPaint method is not called correctly on UserControls when
using double buffering.

See code below: if the two lines are uncommented, the "control painted"
text is not shown after minimizing/maximizing for instance.  Without double
buffering the text is shown correctly.

public class MyControl : UserControl
    {
        public MyControl()
        {
            this.Size = new Size(100, 100);
            //SetStyle(ControlStyles.OptimizedDoubleBuffer, true); // do double
buffering
            //SetStyle(ControlStyles.AllPaintingInWmPaint, true);
        }

        protected override void OnPaint(PaintEventArgs e)
        {
            Console.WriteLine("control painted");
        }
    }


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to