Click here to Skip to main content
15,888,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted
Updated 14-May-18 5:02am
Comments
F-ES Sitecore 14-May-18 10:32am    
Does the target element support new lines?
Matthew Menard 14-May-18 12:03pm    
Not sure. How do I find that out? It's a multiline textbox on an ActiveX control, built using Visual Studio on Windows.

1 solution

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
 
Share this answer
 
Comments
Matthew Menard 14-May-18 12:07pm    
That didn't work. My debugger was saying that "Code \r\n Project" isn't a Byte[]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900