Author: calberto
Date: 2007-03-28 15:54:37 -0500 (Wed, 28 Mar 2007)
New Revision: 75110

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
Log:
2007-03-28  Carlos Alberto Cortez <[EMAIL PROTECTED]>

        * ListView.cs: Add a InvalidateSelection method to
        invalidate methods which are currently selected, and call
        it when setting FullRowSelect and HideSelection, instead of
        calling Redraw.



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-03-28 20:53:26 UTC (rev 75109)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-03-28 20:54:37 UTC (rev 75110)
@@ -1,3 +1,10 @@
+2007-03-28  Carlos Alberto Cortez <[EMAIL PROTECTED]>
+
+       * ListView.cs: Add a InvalidateSelection method to
+       invalidate methods which are currently selected, and call
+       it when setting FullRowSelect and HideSelection, instead of
+       calling Redraw.
+
 2007-03-28  Chris Toshok  <[EMAIL PROTECTED]>
 
        * XplatUIX11.cs (UnmapWindow): reindent this block.

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs      
2007-03-28 20:53:26 UTC (rev 75109)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs      
2007-03-28 20:54:37 UTC (rev 75110)
@@ -441,7 +441,12 @@
                [DefaultValue (false)]
                public bool FullRowSelect {
                        get { return full_row_select; }
-                       set { full_row_select = value; }
+                       set { 
+                               if (full_row_select != value) {
+                                       full_row_select = value;
+                                       InvalidateSelection ();
+                               }
+                       }
                }
 
                [DefaultValue (false)]
@@ -484,7 +489,7 @@
                        set {
                                if (hide_selection != value) {
                                        hide_selection = value;
-                                       this.Redraw (false);
+                                       InvalidateSelection ();
                                }
                        }
                }
@@ -867,6 +872,12 @@
                        Refresh ();
                }
 
+               void InvalidateSelection ()
+               {
+                       foreach (int selected_index in SelectedIndices)
+                               items [selected_index].Invalidate ();
+               }
+
                const int text_padding = 15;
 
                internal Size GetChildColumnSize (int index)

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

Reply via email to