Compartir a través de

TextBoxBase.PreferredHeight Property


Gets the preferred height for a text box.

 property int PreferredHeight { int get(); };
public int PreferredHeight { get; }
member this.PreferredHeight : int
Public ReadOnly Property PreferredHeight As Integer

Property Value

The preferred height of a text box.



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 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 Multiline property is set to true or false.

Applies to

See also