Author: toshok
Date: 2007-01-18 09:01:16 -0500 (Thu, 18 Jan 2007)
New Revision: 71259
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridTextBoxColumn.cs
Log:
2007-01-18 Chris Toshok <[EMAIL PROTECTED]>
* DataGridTextBoxColumn.cs: fix most of the NotWorking unit tests
I just added.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-01-18 13:37:18 UTC (rev 71258)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-01-18 14:01:16 UTC (rev 71259)
@@ -1,3 +1,8 @@
+2007-01-18 Chris Toshok <[EMAIL PROTECTED]>
+
+ * DataGridTextBoxColumn.cs: fix most of the NotWorking unit tests
+ I just added.
+
2007-01-17 Everaldo Canuto <[EMAIL PROTECTED]>
* ToolBar.cs: Add layout methods to ToolBarButtonInfo class, every
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridTextBoxColumn.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridTextBoxColumn.cs
2007-01-18 13:37:18 UTC (rev 71258)
+++
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridTextBoxColumn.cs
2007-01-18 14:01:16 UTC (rev 71259)
@@ -24,8 +24,6 @@
//
//
-// NOT COMPLETE
-
using System.ComponentModel;
using System.Drawing;
using System.Runtime.InteropServices;
@@ -40,8 +38,8 @@
private IFormatProvider format_provider = null;
private StringFormat string_format = new StringFormat ();
private DataGridTextBox textbox;
- private static readonly int offset_x = 0;
- private static readonly int offset_y = 0;
+ private static readonly int offset_x = 2;
+ private static readonly int offset_y = 2;
#endregion // Local Variables
#region Constructors
@@ -161,15 +159,15 @@
textbox.TextAlign = alignment;
+ bool ro = false;
+
if ((ParentReadOnly == true) ||
(ParentReadOnly == false && ReadOnly == true)
||
(ParentReadOnly == false && _ro == true)) {
textbox.ReadOnly = true;
- } else {
- textbox.ReadOnly = false;
}
-
- if (instantText != null && instantText != "") {
+
+ if (!ro && instantText != null && instantText != "") {
textbox.Text = instantText;
}
else {
@@ -180,10 +178,10 @@
textbox.Text = GetFormattedString (obj);
}
- textbox.Location = new Point (bounds.X + offset_x,
bounds.Y + offset_y);
- textbox.Size = new Size (bounds.Width - offset_x,
bounds.Height - offset_y);
-
- textbox.IsInEditOrNavigateMode = true;
+ textbox.ReadOnly = ro;
+ textbox.Bounds = new Rectangle (new Point (bounds.X +
offset_x, bounds.Y + offset_y),
+ new Size (bounds.Width
- offset_x, bounds.Height - offset_y));
+ textbox.IsInEditOrNavigateMode = false;
textbox.Visible = cellIsVisible;
textbox.Focus ();
textbox.SelectAll ();
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches