Control.FontHeight 屬性

定義

取得或設定控制項字型的高度。

C#
protected int FontHeight { get; set; }

屬性值

Int32

控制項的 Font 高度 (單位為像素)。

備註

備註

屬性 FontHeight 不應設定為控制項 Font.Height 值或 -1 以外的任何值。 將 設定 FontHeight 為 -1 的效果是清除快取的高度值,並在下次參考屬性時重新計算該值。

適用於

產品 版本
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8
Windows Desktop 3.0, 3.1, 5, 6, 7

另請參閱