Author: rolf
Date: 2007-05-25 07:43:05 -0400 (Fri, 25 May 2007)
New Revision: 77940
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/KeyEventArgs.cs
Log:
* KeyEventArgs.cs: Added SuppressKeyPress.
* Control.cs: Added support for SuppressKeyPress.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-05-25 11:26:08 UTC (rev 77939)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-05-25 11:43:05 UTC (rev 77940)
@@ -1,3 +1,8 @@
+2007-05-25 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
+
+ * KeyEventArgs.cs: Added SuppressKeyPress.
+ * Control.cs: Added support for SuppressKeyPress.
+
2007-05-24 Andreia Gaita <[EMAIL PROTECTED]>
* NumericUpDown.cs: Refactor code to fix regressions on #79950 and
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
2007-05-25 11:26:08 UTC (rev 77939)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
2007-05-25 11:43:05 UTC (rev 77940)
@@ -153,6 +153,7 @@
private ContextMenuStrip context_menu_strip;
Point auto_scroll_offset;
private AutoSizeMode auto_size_mode;
+ private bool suppressing_key_press;
#endif
#endregion // Local Variables
@@ -4236,6 +4237,9 @@
case (int)Msg.WM_KEYDOWN: {
key_event = new KeyEventArgs
((Keys)msg.WParam.ToInt32 ());
OnKeyDown (key_event);
+#if NET_2_0
+ suppressing_key_press =
key_event.SuppressKeyPress;
+#endif
return key_event.Handled;
}
@@ -4248,6 +4252,10 @@
case (int)Msg.WM_SYSCHAR:
case (int)Msg.WM_CHAR: {
+#if NET_2_0
+ if (suppressing_key_press)
+ return true;
+#endif
KeyPressEventArgs key_press_event;
key_press_event = new
KeyPressEventArgs((char)msg.WParam);
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/KeyEventArgs.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/KeyEventArgs.cs
2007-05-25 11:26:08 UTC (rev 77939)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/KeyEventArgs.cs
2007-05-25 11:43:05 UTC (rev 77940)
@@ -35,6 +35,10 @@
private Keys key_data;
private bool event_handled;
+#if NET_2_0
+ private bool supress_key_press;
+#endif
+
#region Public Constructors
public KeyEventArgs(Keys keyData) {
this.key_data=keyData | XplatUI.State.ModifierKeys;
@@ -106,6 +110,18 @@
}
}
}
+
+#if NET_2_0
+ public bool SuppressKeyPress {
+ get {
+ return supress_key_press;
+ }
+ set {
+ supress_key_press = value;
+ event_handled = true;
+ }
+ }
+#endif
#endregion // Public Instance Properties
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches