- PreferredHeight is a little different than i thought.
authorJackson Harper <jackson@novell.com>
Wed, 20 Dec 2006 16:47:16 +0000 (16:47 -0000)
committerJackson Harper <jackson@novell.com>
Wed, 20 Dec 2006 16:47:16 +0000 (16:47 -0000)
svn path=/trunk/mcs/; revision=69815

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs

index b1159979ae439b31455362785cc23bf439a14b77..ed88aa19bdc00e492af1617e12220c7c4859d3bd 100644 (file)
@@ -3,6 +3,7 @@
        * TextBoxBase.cs: When changing the font across the document we
        can't recalculate after changing each line, since that will cahnge
        the line count.
+       - PreferredHeight is a little different than i thought.
 
 2006-12-19  Rolf Bjarne Kvinge  <RKvinge@novell.com>
 
index 988d3b84915f0e90db7c990c19e09aae045a8691..011e1061775a19847430d966412b92621c40f02a 100644 (file)
@@ -460,16 +460,7 @@ namespace System.Windows.Forms {
                [EditorBrowsable(EditorBrowsableState.Advanced)]
                public int PreferredHeight {
                        get {
-                               int bs = 0;
-                               switch (border_style) {
-                               case BorderStyle.FixedSingle:
-                                       bs = 2;
-                                       break;
-                               case BorderStyle.Fixed3D:
-                                       bs = ThemeEngine.Current.Border3DSize.Width * 2;
-                                       break;
-                               }
-                               return this.Font.Height + 7 + bs;
+                               return (BorderStyle == BorderStyle.None ? 0 : Font.Height + 7);
                        }
                }