Author: toshok
Date: 2007-01-15 23:19:01 -0500 (Mon, 15 Jan 2007)
New Revision: 71105
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs
Log:
* ComboBox.cs: same.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-01-16 02:41:34 UTC (rev 71104)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-01-16 04:19:01 UTC (rev 71105)
@@ -27,6 +27,8 @@
* TabControl.cs: same.
+ * ComboBox.cs: same.
+
2007-01-15 Everaldo Canuto <[EMAIL PROTECTED]>
* Menu.cs: implement MergeItems and Replace for MenuMerge method.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
2007-01-16 02:41:34 UTC (rev 71104)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
2007-01-16 04:19:01 UTC (rev 71105)
@@ -1649,13 +1649,13 @@
else
document.CaretLostFocus ();
}
-
- internal override void OnGotFocusInternal (EventArgs e)
+
+ protected override void OnGotFocus (EventArgs e)
{
owner.Select (false, true);
}
- internal override void OnLostFocusInternal (EventArgs e)
+ protected override void OnLostFocus (EventArgs e)
{
owner.Select (false, true);
}
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs
2007-01-16 02:41:34 UTC (rev 71104)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs
2007-01-16 04:19:01 UTC (rev 71105)
@@ -565,7 +565,23 @@
protected override void WndProc (ref Message m)
{
- base.WndProc (ref m);
+ switch ((Msg)m.Msg) {
+ case Msg.WM_SETFOCUS:
+ if (selected_index == -1 && this.TabCount > 0)
+ this.SelectedIndex = 0;
+ if (selected_index != -1)
+ Invalidate(GetTabRect(selected_index));
+ base.WndProc (ref m);
+ break;
+ case Msg.WM_KILLFOCUS:
+ if (selected_index != -1)
+ Invalidate(GetTabRect(selected_index));
+ base.WndProc (ref m);
+ break;
+ default:
+ base.WndProc (ref m);
+ break;
+ }
}
protected virtual void OnSelectedIndexChanged (EventArgs e)
@@ -580,23 +596,6 @@
Draw (pe.Graphics, pe.ClipRectangle);
pe.Handled = true;
}
-
- internal override void OnGotFocusInternal(EventArgs e) {
- if (selected_index == -1 && this.TabCount > 0)
- this.SelectedIndex = 0;
- if (selected_index != -1)
- Invalidate(GetTabRect(selected_index));
- base.OnGotFocusInternal (e);
- }
-
-
- internal override void OnLostFocusInternal(EventArgs e) {
- if (selected_index != -1)
- Invalidate(GetTabRect(selected_index));
- base.OnLostFocusInternal (e);
- }
-
-
#endregion // Protected Instance Methods
#region Internal & Private Methods
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches