Label.AutoEllipsis 屬性


取得或設定值,指出省略字元 (...) 是否會顯示在 Label 的右邊緣,表示 Label 文字超過 Label 的指定長度。Gets or sets a value indicating whether the ellipsis character (...) appears at the right edge of the Label, denoting that the Label text extends beyond the specified length of the Label.

 property bool AutoEllipsis { bool get(); void set(bool value); };
public bool AutoEllipsis { get; set; }
member this.AutoEllipsis : bool with get, set
Public Property AutoEllipsis As Boolean


如果要以省略符號表示還有其他標籤文字,則為 true,否則為 falsetrue if the additional label text is to be indicated by an ellipsis; otherwise, false. 預設為 falseThe default is false.



將 [AutoEllipsis] 設定為 [true],會在使用者以滑鼠傳遞控制項時,顯示超出 Label 寬度的文字。Set AutoEllipsis to true to display text that extends beyond the width of the Label when the user passes over the control with the mouse. 如果 trueAutoSize,標籤將會成長以符合文字,而且不會出現省略號。If AutoSize is true, the label will grow to fit the text and an ellipsis will not appear.


如果字型高於 Label 的高度,而且 AutoEllipsistrue,您必須將 AutoSize 設定為 [false 以繪製文字]。If the font is taller than the height of the Label and AutoEllipsis is true, you must set AutoSize to false for text to be drawn.