开发者

Dynamic Windows Forms TextBox

开发者 https://www.devze.com 2022-12-08 09:13 出处:网络
I am creating a TextBox dynamically and adding that in a TabPage which is itself also dynamically created.

I am creating a TextBox dynamically and adding that in a TabPage which is itself also dynamically created.

But the problem is, the TextBox is not showing text formatting correcly.

For example: \t and \n are not reflected at all.开发者_如何学JAVA

I have already set property Multiline to True. But again no improvement.

What to check for?


When you dynamically create the TextBox, make sure you set its MultiLine property to true (the default is false). And if you want multiline text, you have to use \r\n - just \n won't do it. \t puts a Tab in correctly - maybe you're looking for something else?

0

精彩评论

暂无评论...
验证码 换一张
取 消