本文介绍了在c#中将一行拆分为多行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

假设我有一条线,即

Thisssssssssssssssssssssssssssssssssss Loooooooooong Teeeeeeeeeeeeeeeeeeeeeeext



我必须将这一行放在许多行中。到面板的宽度。那是我写一些随机文本给label.text(放在面板中)。然后,面板剩余文本的大小将转移到下一行,如果剩余的文本仍然大于面板大小,文本将再次中断,剩余的文本将转到第3行



喜欢: -

Thissssssssssssssssssssssssssssssss

Loooooooooong Teeeeeeeeeee

eeeeeeeeeeext



这是Windows窗体中的所有内容。

我们非常感谢代码和指导。

Hello,
Let suppose I've a line i.e
"Thisssssssssssssssssss Isssssssss Loooooooooong Teeeeeeeeeeeeeeeeeeeeeeext"

I have to place this single line in many lines acc. to the width of the panel. That is when I write some random text given to a label.text (which is placed in panel). then after the size of panel remaining text will transfer to the next line and if remaining text is still larger than panel size than the text will again break and that remaining text will go to the 3rd line

Like:-
Thisssssssssssssssssss Isssssssss
Loooooooooong Teeeeeeeeeee
eeeeeeeeeeext

This is all in windows form.
Code and guidance is highly appreciated.

推荐答案




这篇关于在c#中将一行拆分为多行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 01:34