TextBoxBase.PreferredHeight Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the preferred height for a text box.
public:
property int PreferredHeight { int get(); };
[System.ComponentModel.Browsable(false)]
public int PreferredHeight { get; }
[<System.ComponentModel.Browsable(false)>]
member this.PreferredHeight : int
Public ReadOnly Property PreferredHeight As Integer
Property Value
The preferred height of a text box.
- Attributes
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 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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈