Author: calberto
Date: 2007-10-05 12:24:18 -0400 (Fri, 05 Oct 2007)
New Revision: 86998

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

        * TreeView.cs: When calling EndEdit and we need to hide the textbox,
        call Application.DoEvents. This is neccessary when we get a call to
        BeginEdit from an AfterLabelEdit handler, because the focus always
        goes to the TreeView, even if we try to give it to our
        LabelEditTextBox. The call do Application.DoEvents seems to
        synchronize the focus, basically.
        Fixes #325244.



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-10-05 16:16:32 UTC (rev 86997)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-10-05 16:24:18 UTC (rev 86998)
@@ -1,3 +1,13 @@
+2007_10-05  Carlos Alberto Cortez <[EMAIL PROTECTED]>
+
+       * TreeView.cs: When calling EndEdit and we need to hide the textbox,
+       call Application.DoEvents. This is neccessary when we get a call to
+       BeginEdit from an AfterLabelEdit handler, because the focus always
+       goes to the TreeView, even if we try to give it to our
+       LabelEditTextBox. The call do Application.DoEvents seems to
+       synchronize the focus, basically.
+       Fixes #325244.
+
 2007-10-04  Carlos Alberto Cortez <[EMAIL PROTECTED]>
 
        * TreeView.cs: When AfterLabelEdit event is fired, TreeNode.IsEditing

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs      
2007-10-05 16:16:32 UTC (rev 86997)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs      
2007-10-05 16:24:18 UTC (rev 86998)
@@ -1688,6 +1688,13 @@
                        if (edit_text_box != null && edit_text_box.Visible) {
                                edit_text_box.Visible = false;
                                Focus ();
+
+                               //
+                               // If we get a call to BeginEdit from any 
AfterLabelEdit handler,
+                               // the focus seems to always remain in the 
TreeView. This call seems
+                               // to synchronize the focus events - I don't 
like it but it works
+                               //
+                               Application.DoEvents ();
                        }
 
                        if (edit_node != null && edit_node == node) {

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

Reply via email to