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.

public:
 property bool AutoEllipsis { bool get(); void set(bool value); };
[System.ComponentModel.Browsable(true)]
public bool AutoEllipsis { get; set; }
[<System.ComponentModel.Browsable(true)>]
member this.AutoEllipsis : bool with get, set
Public Property AutoEllipsis As Boolean

属性值

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. 如果 AutoSizetrue ,则标签将增长以适应文本,并且不会出现省略号。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.

适用于

另请参阅