Author: pbartok
Date: 2006-03-06 13:48:34 -0500 (Mon, 06 Mar 2006)
New Revision: 57626

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Splitter.cs
Log:
2006-03-06  Peter Dennis Bartok  <[EMAIL PROTECTED]>

        * Splitter.cs: In situations where the affected control is added
          to the parent's control list after the splitter, we would not
          populate affected. Now we try populating it on mousedown, if
          it's not already set. (Maybe we should always do it, at the cost
          of performance?)



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-03-06 18:46:00 UTC (rev 57625)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-03-06 18:48:34 UTC (rev 57626)
@@ -1,3 +1,11 @@
+2006-03-06  Peter Dennis Bartok  <[EMAIL PROTECTED]>
+
+       * Splitter.cs: In situations where the affected control is added
+         to the parent's control list after the splitter, we would not
+         populate affected. Now we try populating it on mousedown, if
+         it's not already set. (Maybe we should always do it, at the cost
+         of performance?)
+
 2006-03-03  Matt Hargett  <[EMAIL PROTECTED]>
 
        * Control.cs: implement Control.Padding

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Splitter.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Splitter.cs      
2006-03-06 18:46:00 UTC (rev 57625)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Splitter.cs      
2006-03-06 18:48:34 UTC (rev 57626)
@@ -99,6 +99,7 @@
 
                        Paint += new PaintEventHandler(PaintSplitter);
                        Layout += new LayoutEventHandler(LayoutSplitter);
+                       this.ParentChanged += new 
EventHandler(ReparentSplitter);
                        Cursor = splitter_we;
                }
                #endregion      // Constructors
@@ -374,6 +375,11 @@
                        base.OnMouseDown (e);
 
                        // Only allow if we are set up properly
+                       if (affected == null) {
+                               affected = AffectedControl;
+                               filler = FillerControl;
+                       }
+
                        if (affected == null || e.Button != MouseButtons.Left) {
                                return;
                        }
@@ -647,6 +653,11 @@
                        filler = FillerControl;
                }
 
+               private void ReparentSplitter(object sender, EventArgs e) {
+                       affected = AffectedControl;
+                       filler = FillerControl;
+               }
+
                private void DrawDragHandle(DrawType type) {
                        Rectangle       prev;
                        Rectangle       current;

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

Reply via email to