Author: pbartok
Date: 2005-03-09 01:41:37 -0500 (Wed, 09 Mar 2005)
New Revision: 41585

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
Log:
2005-03-08  Peter Bartok  <[EMAIL PROTECTED]>

        * Control.cs: Fixed bug #73190; now invokes CreateControl (which
          in turn triggers OnCreateContro) when creating a handle for the
          first time.
        * TextControl.cs: Fixed endless loop in certain cases when 
          replacing the current selection



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2005-03-09 06:06:18 UTC (rev 41584)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2005-03-09 06:41:37 UTC (rev 41585)
@@ -1,6 +1,14 @@
+2005-03-08  Peter Bartok  <[EMAIL PROTECTED]>
+
+       * Control.cs: Fixed bug #73190; now invokes CreateControl (which
+         in turn triggers OnCreateContro) when creating a handle for the
+         first time.
+       * TextControl.cs: Fixed endless loop in certain cases when 
+         replacing the current selection
+
 2005-03-08  Jordi Mas i Hernandez <[EMAIL PROTECTED]>
 
-       * ScrollBar.cs
+       * ScrollBar.cs:
          - Honors NewValue changes in Scroll events allowing apps to change it
          - Adds First and Last Scroll events
          - Fixes Thumb events

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs       
2005-03-09 06:06:18 UTC (rev 41584)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs       
2005-03-09 06:41:37 UTC (rev 41585)
@@ -2032,12 +2032,16 @@
 
                public void CreateControl() {
 
-                       if (!IsHandleCreated)
+                       if (!IsHandleCreated) {
                                CreateHandle();
+                       }
 
                        for (int i=0; i<child_controls.Count; i++) {
-                               child_controls[i].CreateControl();
+                               if (!child_controls[i].IsHandleCreated) {
+                                       child_controls[i].CreateHandle();
+                               }
                        }
+
                        OnCreateControl();
                }
 
@@ -2552,6 +2556,11 @@
                                window = new ControlNativeWindow(this);
                                window.CreateHandle(CreateParams);
 
+                               // window is only null if the handle is created 
for the first time; make sure OnCreateControl is triggered
+                               // This also causes our children to be created 
ona CreateHandle call, which shouldn't really be a problem 
+                               // but may not match MS
+                               CreateControl();
+
                                // Find out where the window manager placed us
                                UpdateBounds();
                                UpdateStyles();

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs   
2005-03-09 06:06:18 UTC (rev 41584)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs   
2005-03-09 06:41:37 UTC (rev 41585)
@@ -2041,7 +2041,7 @@
 
                                start++;
                                if (start < end) {
-                                       for (i = end - 1; i >= start; i++) {
+                                       for (i = end - 1; i >= start; i--) {
                                                Delete(i);
                                        }
                                }

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

Reply via email to