如何在标签中设置长度 [英] How to set a length into label
本文介绍了如何在标签中设置长度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
例如标签不能包含超过4个字母.
Labe ...
ex. label could not contain more than 4 letters .
Labe...
推荐答案
从问题中给出的信息尚不清楚问题是什么.
但是,对于Label
控件,当AutoSize
属性设置为True
(这是默认行为)时,将调整Label的大小以显示整个文本,如在此说明 ^ ]
另一方面,如果AutoSize
属性设置为False
,则Text
如果超出Label
的宽度,则将被截断;如果AutoEllipsis
属性设置为true
,则省略号将被截断.当文本超出标签的宽度时,将出现在Label
的右侧,如此处所述
Label.AutoEllipsis属性 [
From the information given in the question it is not clear what the problem is.
However, for aLabel
control, when theAutoSize
property is set toTrue
, which is the default behaviour, the size of the Label will be adjusted to display the entire text as explained here Label.AutoSize Property[^]
On the other hand if theAutoSize
property is set toFalse
, theText
will be truncated if it exceeds the width of theLabel
and if theAutoEllipsis
property is set totrue
, ellipsis will appear towards the right side of theLabel
when text exceeds the width of the Label as explained here
Label.AutoEllipsis Property[^]
没有设置长度的事情.只是给它更多的空间以查看更多.
—SA
There is no such thing as setting the length. Just give it more room to see more.
—SA
这篇关于如何在标签中设置长度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文