Author: jpobst
Date: 2007-08-23 16:52:44 -0400 (Thu, 23 Aug 2007)
New Revision: 84753
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs
Log:
2007-08-23 Jonathan Pobst <[EMAIL PROTECTED]>
* TreeView.cs: IsInputKey: don't ask for any keys if the handle hasn't
been created. If handle is created, we want arror keys. If we are
editing
a node, we want things like enter, esc, home, end, page up, page down.
Allows Esc to work for FolderBrowserDialog.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-08-23 20:47:26 UTC (rev 84752)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-08-23 20:52:44 UTC (rev 84753)
@@ -1,5 +1,12 @@
2007-08-23 Jonathan Pobst <[EMAIL PROTECTED]>
+ * TreeView.cs: IsInputKey: don't ask for any keys if the handle hasn't
+ been created. If handle is created, we want arror keys. If we are
editing
+ a node, we want things like enter, esc, home, end, page up, page down.
+ Allows Esc to work for FolderBrowserDialog.
+
+2007-08-23 Jonathan Pobst <[EMAIL PROTECTED]>
+
* ColorDialog.cs, FontDialog.cs: Set the form's CancelButton so that
they close when ESC is pressed. Thanks Andy!
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs
2007-08-23 20:47:26 UTC (rev 84752)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs
2007-08-23 20:52:44 UTC (rev 84753)
@@ -866,19 +866,23 @@
protected override bool IsInputKey (Keys key_data)
{
- if ((key_data & Keys.Alt) == 0) {
+ if (IsHandleCreated && (key_data & Keys.Alt) == 0) {
switch (key_data & Keys.KeyCode) {
+ case Keys.Left:
+ case Keys.Up:
+ case Keys.Right:
+ case Keys.Down:
+ return true;
case Keys.Enter:
case Keys.Escape:
case Keys.Prior:
case Keys.Next:
case Keys.End:
case Keys.Home:
- case Keys.Left:
- case Keys.Up:
- case Keys.Right:
- case Keys.Down:
- return true;
+ if (edit_node != null)
+ return true;
+
+ break;
}
}
return base.IsInputKey (key_data);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches