Author: jackson
Date: 2007-04-24 13:45:28 -0400 (Tue, 24 Apr 2007)
New Revision: 76206
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
Log:
* TextBoxBase.cs: Fixup the height of textboxes when the control
is created.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-04-24 17:26:39 UTC (rev 76205)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-04-24 17:45:28 UTC (rev 76206)
@@ -1,3 +1,8 @@
+2007-04-24 Jackson Harper <[EMAIL PROTECTED]>
+
+ * TextBoxBase.cs: Fixup the height of textboxes when the control
+ is created.
+
2007-04-24 Jonathan Pobst <[EMAIL PROTECTED]>
* ToolStrip.cs: Fully implement GetNextItem. Call
OnParentRightToLeftChanged
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
2007-04-24 17:26:39 UTC (rev 76205)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
2007-04-24 17:45:28 UTC (rev 76206)
@@ -846,6 +846,7 @@
protected override void OnHandleCreated(EventArgs e) {
base.OnHandleCreated (e);
+ FixupHeight ();
}
protected override void OnHandleDestroyed(EventArgs e) {
@@ -1243,6 +1244,7 @@
protected override void SetBoundsCore(int x, int y, int width,
int height, BoundsSpecified specified) {
// Make sure we don't get sized bigger than we want to
be
+
if (!richtext) {
if (!document.multiline) {
if (height != PreferredHeight) {
@@ -1449,10 +1451,6 @@
return Graphics.FromImage(bmp);
}
- #if Debug
- static int current;
- #endif
-
internal override void OnPaintInternal (PaintEventArgs pevent) {
// Fill background
if (backcolor_set || (Enabled && !read_only)) {
@@ -1470,6 +1468,17 @@
pevent.Handled = true;
}
+ private void FixupHeight ()
+ {
+ if (!richtext) {
+ if (!document.multiline) {
+ if (actual_border_style ==
BorderStyle.None && PreferredHeight != ClientSize.Height) {
+ ClientSize = new Size
(ClientSize.Width, PreferredHeight);
+ }
+ }
+ }
+ }
+
private bool IsDoubleClick (MouseEventArgs e)
{
TimeSpan interval = DateTime.Now - click_last;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches