Click here to Skip to main content
15,903,856 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a text box that is populated from a file via IO stream reader
I want the text from textbox1 to go to textbox2 but
what i would like to do is have every { character that is found in this textbox1 have a line break immediately after the { character and a tab added to next line. Also it would look for the } character and make line break immediately after the } character but no tab after } character before or while it is being moved to textbox2. I have searched google for the last 3 hrs and still found no solution I was looking at the string.Replace and if this works have not found a way. If you have any suggestions please share Thank you for your time and god bless.
Posted

Also you can add "button click" named "cleae" with the code " clear(); " in way u click it it will replace every thing on you form

thank you and good luck
 
Share this answer
 
Comments
Toli Cuturicu 8-Jun-10 16:20pm    
Reason for my vote of 1
nonsense?
This should work:

string text = textBox1.Text.Replace("{","{\\r\\n\\t");
textBox2.Text = text.Replace("}","}\\r\\n");


The TextBox should have multiline property set to true for this to work.
 
Share this answer
 

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