How is CheckBox with multi-line text done in Windows Forms?

萝らか妹 提交于 2019-12-05 12:31:22

问题


How do I extend the text in a Windows Forms CheckBox to more than one line?


回答1:


You need to use \r\n in order to add a new line. You might have to do this in the code behind. So your code would be like this:

myLabel.Text = "New\r\nLine\r\nExample";



回答2:


First you should turn autosize property to False. Then resize the box and use \r\n for going to next line.



来源:https://stackoverflow.com/questions/5937637/how-is-checkbox-with-multi-line-text-done-in-windows-forms

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!