gpt4 book ai didi

.net - 为标签设置 WordWrap = false

转载 作者:行者123 更新时间:2023-12-04 23:10:08 27 4
gpt4 key购买 nike

我应该如何设置 WordWrap = falseSystem.Windows.Forms.Label ?

我在面板上有一个标题,它应该显示 "MyPanel capt..." .所以我使用 AutoEllipsis = true ,但这还不够。

我也使用“AutoSize = true ”,因为我希望标签占用尽可能小的空间。

同意,Visual Basic 6.0做到了。

最佳答案

我有类似的效果使用:

label1.AutoSize = false;
label1.AutoEllipsis = true;

并将标签区域的高度调整为一行。

关于.net - 为标签设置 WordWrap = false,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2630516/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com