标签中的行间距 + VB.Net
我的表单上有一个 .NET 2.0 标准标签,我在其中放置了一些多行文本。但行距太小。只是想知道是否有办法解决这个问题。
谢谢...
I have a .NET 2.0 standard Label on my form, well I put some text in it with several lines. But the spacing between the lines are too small. Just want to know if there's a way to fix this.
Thanks...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我能看到的唯一解决方案是制作多个标签并适当地间隔标签。
您可能需要动态创建标签,每行一个。
当然,您可以对要显示的文本执行 .Split(vbNewLine),然后为列表中的每个字符串创建一个新的标签控件,将其添加到表单中,并将其与前一个标签适当间隔开。
并不理想,但几乎是实现这一目标的唯一方法。
The only solution I can see would be to make multiple labels and space the labels appropriately.
You may need to create the labels dynamically, one per line.
Of course, you could do a .Split(vbNewLine) on the text you want to display and then for each string in the list, create a new label control, adding it to the form, and spacing it out appropriately from the previous label.
Not ideal, but about the only way to accomplish it.
还有另一种替代方法,即使用 WinformHTMLTextBox,然后使用 html 代码嵌入内容,这样您就可以利用 CSS 的优势。
There is another alternative way to work out that you use the WinformHTMLTextBox then embed the content by using html code which you can employ the advantage of CSS.