Control.FontHeight 属性

定义

获取或设置控件的字体的高度。Gets or sets the height of the font of the control.

protected:
 property int FontHeight { int get(); void set(int value); };
protected int FontHeight { get; set; }
member this.FontHeight : int with get, set
Protected Property FontHeight As Integer

属性值

控件的 Font 的高度(以像素为单位)。The height of the Font of the control in pixels.

注解

备注

不应将 FontHeight 属性设置为除控件的 Font.Height 值以外的任何值,或者设置为-1。The FontHeight property should not be set to any value other than the control's Font.Height value, or -1. 设置 FontHeight 到-1 的作用是清除缓存的高度值,并在下一次引用属性时重新计算该值。Setting FontHeight to -1 has the effect of clearing the cached height value, and the value is recalculated the next time the property is referenced.

适用于

另请参阅