在C#中的activex控件中向文本框添加换行符 [英] Adding a newline character to a textbox in an activex control in C#

查看:167
本文介绍了在C#中的activex控件中向文本框添加换行符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将一个换行符添加到我要打印到ActiveX控件中的状态框的字符串中。状态框是多行TextBox。我已经尝试将\\\\ n添加到字符串中,我已经尝试将System.Environment.NewLine添加到字符串中,但似乎没有任何效果。不知道还有什么要尝试的。任何想法,将不胜感激。谢谢。



我尝试了什么:



我试过了在字符串中添加\\\\ n。我也尝试过System.Environment.NewLine到字符串,但都不起作用。

I'm trying to add a newline character to a string that I want to print out to a status box in my ActiveX control. The status box is a multiline TextBox. I've tried adding "\r\n" to the string, I've tried add System.Environment.NewLine to the string, but nothing seems to work. Not sure what else to trying. Any ideas would be appreciated. Thanks.

What I have tried:

I've tried adding "\r\n" to the string. I've also tried System.Environment.NewLine to the string, but neither works.

推荐答案

你好,



如你的问题所述,它是多行文本框,你可以尝试下面这样的东西。

Hello,

As mentioned in your question, it's multiline text box, you can try something like below.
multilinetextbox.Text = BitConverter.ToString("Code \r\n Project");





--RA



--RA


这篇关于在C#中的activex控件中向文本框添加换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆