visual-studio Visual Studio - 通过设计器在标签中添加换行符?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2714977/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Visual Studio - Add a line break in a label via the designer?
提问by Vaccano
I have a label that I want to use to show some text. I want to show a few paragraphs of text.
我有一个标签,我想用它来显示一些文本。我想显示几段文字。
Is there a way via the designer to make a line break in the text? (\n\r just shows \n\r)
有没有办法通过设计者在文本中换行?(\n\r 只显示\n\r)
This is WinForms (actually it is Compact Framework.)
这是 WinForms(实际上是 Compact Framework。)
回答by RedFilter
Select the dropdownnext to the label. Then you can just use the Enterkey to enter line breaks.
选择标签旁边的下拉菜单。然后您可以只使用该Enter键输入换行符。
回答by SLaks
You can click the down arrow in the Text property to see a multi-line text field.
您可以单击 Text 属性中的向下箭头以查看多行文本字段。
In the popup, you can press Enterto make a newline.
在弹出窗口中,您可以按Enter换行。


