Author: jackson
Date: 2005-03-23 20:11:08 -0500 (Wed, 23 Mar 2005)
New Revision: 42180

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs
Log:
        * TabControl.cs: Give the tab page focus when it is selected.



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2005-03-23 23:41:38 UTC (rev 42179)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2005-03-24 01:11:08 UTC (rev 42180)
@@ -1,5 +1,9 @@
 2005-03-23  Jackson Harper  <[EMAIL PROTECTED]>
 
+       * TabControl.cs: Give the tab page focus when it is selected.
+
+2005-03-23  Jackson Harper  <[EMAIL PROTECTED]>
+
        * TabControl.cs: Account for the drawing of tabs borders when
        invalidating. If the slider was clicked dont do click detection on
        the tabs.

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs    
2005-03-23 23:41:38 UTC (rev 42179)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs    
2005-03-24 01:11:08 UTC (rev 42180)
@@ -225,14 +225,17 @@
 
                                OnSelectedIndexChanged (EventArgs.Empty);
 
+                               TabPage selected = (TabPage) Controls 
[selected_index];
+
                                if (selected_index != -1) {
                                        invalid = Rectangle.Union (invalid, 
GetTabRect (selected_index));
-                                       Controls [selected_index].Visible = 
true;
+                                       selected.Visible = true;
+                                       selected.Focus ();
                                }
 
                                ResumeLayout ();
 
-                               if (SelectedIndex != -1 && TabPages 
[SelectedIndex].Row != BottomRow) {
+                               if (selected_index != -1 && selected.Row != 
BottomRow) {
                                        DropRow (TabPages [selected_index].Row);
                                        // calculating what to invalidate here 
seems to be slower then just
                                        // refreshing the whole thing

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

Reply via email to