Export (0) Print
Expand All

TextBoxBase.AutoSize Property

Gets or sets a value indicating whether the height of the control automatically adjusts when the font assigned to the control is changed.

[Visual Basic]
Public Overridable Property AutoSize As Boolean
[C#]
public virtual bool AutoSize {get; set;}
[C++]
public: __property virtual bool get_AutoSize();
public: __property virtual void set_AutoSize(bool);
[JScript]
public function get AutoSize() : Boolean;
public function set AutoSize(Boolean);

Property Value

true if the height of the control automatically adjusts when the font is changed; otherwise, false. The default is true.

Remarks

Multiline text box controls ignore this property setting. When this property is set to true, the text box control resizes its height based on the size of the font assigned to the control. You can use this property to ensure that the user can read text assigned to a single-line version of the control regardless of the font.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

TextBoxBase Class | TextBoxBase Members | System.Windows.Forms Namespace

Show:
© 2015 Microsoft