Author: toshok
Date: 2006-06-12 11:42:06 -0400 (Mon, 12 Jun 2006)
New Revision: 61629
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridTextBox.cs
Log:
* DataGridTextBox.cs (.ctor): isedit defaults to false.
(OnKeyPress): set isedit to true.
(ProcessKeyMessage): remove Keys.Enter handling from here. it's
already handled by the grid.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-06-12 15:35:20 UTC (rev 61628)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-06-12 15:42:06 UTC (rev 61629)
@@ -1,5 +1,10 @@
2006-06-12 Chris Toshok <[EMAIL PROTECTED]>
+ * DataGridTextBox.cs (.ctor): isedit defaults to false.
+ (OnKeyPress): set isedit to true.
+ (ProcessKeyMessage): remove Keys.Enter handling from here. it's
+ already handled by the grid.
+
* DataGrid.cs (set_CurrentCell): more work here. it's still not
right. ugh.
(set_DataSource): SetDataSource always returns true, so stop
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridTextBox.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridTextBox.cs
2006-06-12 15:35:20 UTC (rev 61628)
+++
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridTextBox.cs
2006-06-12 15:42:06 UTC (rev 61629)
@@ -47,7 +47,7 @@
#region Constructors
public DataGridTextBox ()
{
- isedit = true;
+ isedit = false;
grid = null;
accepts_tab = true;
accepts_return = true;
@@ -59,12 +59,8 @@
#region Public Instance Properties
public bool IsInEditOrNavigateMode {
- get {
- return isedit;
- }
- set {
- isedit = value;
- }
+ get { return isedit; }
+ set { isedit = value; }
}
#endregion // Public Instance Properties
@@ -72,6 +68,7 @@
#region Public Instance Methods
protected override void OnKeyPress (KeyPressEventArgs e)
{
+ isedit = true;
grid.ColumnStartedEditing (Bounds);
base.OnKeyPress (e);
}
@@ -85,9 +82,6 @@
{
Keys key = (Keys) m.WParam.ToInt32 ();
- // If we decide DataGrid needs to process we call
grid.ProcessKeyPreviewInternal and return true
- // If we want TextBox to handle the key , we return
false;
-
switch ((Msg)m.Msg) {
case Msg.WM_CHAR:
return ProcessKeyEventArgs (ref m);
@@ -99,12 +93,6 @@
SelectionLength = 0;
return true;
- case Keys.Enter:
- isedit = false;
- grid.EndEdit (false);
- grid.ProcessKeyPreviewInternal(ref m);
- return true;
-
case Keys.Left:
if (SelectionStart > 0)
return false;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches