System.Windows.Forms.TextBoxBase.PreferredHeight Property

Gets the preferred height for a text box.

Syntax

[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.ComponentModel.Browsable(false)]
public int PreferredHeight { get; }

Value

Documentation for this section has not yet been entered.

Remarks

The size returned by this property is based on the font height and border style of the text box. You can use this property to determine the appropriate size of the text box to ensure that text is properly displayed in the control. The value returned by this property is in pixels.

The value of TextBoxBase.PreferredHeight represents the minimum height the text box must have in order to display a single line of text without clipping the text on the top or bottom. This value is the same whether the TextBoxBase.Multiline property is set to true or false.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0
Since: .NET 2.0