Label.AutoEllipsis Label.AutoEllipsis Label.AutoEllipsis Label.AutoEllipsis Property

定义

获取或设置一个值,指示是否要在 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; }
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.

注解

如果设置true为, 则当用户通过鼠标越过控件时, 将AutoEllipsis显示超出宽度的文本。 LabelSet 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, 则必须将设置AutoSizefalse , 以获取要绘制的文本。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.

适用于

另请参阅