Author: toshok
Date: 2006-05-16 09:10:46 -0400 (Tue, 16 May 2006)
New Revision: 60736

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGrid.cs
   
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridDrawingLogic.cs
Log:
2006-05-16  Chris Toshok  <[EMAIL PROTECTED]>

        [ fixes bug #78410 ]
        * DataGrid.cs (set_AlternatingBackColor): use
        grid_drawing.InvalidateCells instead of Refresh().
        (set_BackColor): call grid_drawing.InvalidateCells.
        (set_BackgroundColor): use Invalidate instead of Refresh.

        * DataGridDrawingLogic.cs (InvalidateCells): new function, just
        invalidate the cell area.



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-05-16 11:51:53 UTC (rev 60735)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-05-16 13:10:46 UTC (rev 60736)
@@ -1,3 +1,14 @@
+2006-05-16  Chris Toshok  <[EMAIL PROTECTED]>
+
+       [ fixes bug #78410 ]
+       * DataGrid.cs (set_AlternatingBackColor): use
+       grid_drawing.InvalidateCells instead of Refresh().
+       (set_BackColor): call grid_drawing.InvalidateCells.
+       (set_BackgroundColor): use Invalidate instead of Refresh.
+
+       * DataGridDrawingLogic.cs (InvalidateCells): new function, just
+       invalidate the cell area.
+
 2006-05-15  Chris Toshok  <[EMAIL PROTECTED]>
 
        [ fixes bug #78011 ]

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGrid.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGrid.cs      
2006-05-16 11:51:53 UTC (rev 60735)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGrid.cs      
2006-05-16 13:10:46 UTC (rev 60736)
@@ -293,7 +293,7 @@
                        set {
                                if (alternating_backcolor != value) {
                                        alternating_backcolor = value;
-                                       Refresh ();
+                                       grid_drawing.InvalidateCells ();
                                }
                        }
                }
@@ -303,7 +303,10 @@
                                return backColor;
                        }
                        set {
-                               backColor = value;
+                               if (backColor != value) {
+                                       backColor = value;
+                                       grid_drawing.InvalidateCells ();
+                               }
                        }
                }
 
@@ -315,7 +318,7 @@
                                 if (background_color != value) {
                                        background_color = value;
                                        OnBackgroundColorChanged 
(EventArgs.Empty);
-                                       Refresh ();
+                                       Invalidate ();
                                }
                        }
                }

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridDrawingLogic.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridDrawingLogic.cs
  2006-05-16 11:51:53 UTC (rev 60735)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridDrawingLogic.cs
  2006-05-16 13:10:46 UTC (rev 60736)
@@ -534,8 +534,15 @@
 
                        grid.Invalidate (caption_area);
                }
+
+               public void InvalidateCells ()
+               {
+                       if (cells_area.IsEmpty)
+                               return;
+
+                       grid.Invalidate (cells_area);
+               }
                
-               
                public void InvalidateRow (int row)
                {
                        if (row < grid.FirstVisibleRow || row > 
grid.FirstVisibleRow + grid.VisibleRowCount) {

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to