Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi guyz.
I find how to break a statement difficult in the textbox( for example: if i write textbox1.text - ''information technology'') so this two words should be display in a seperate line, like
(information
technology). I tried my best for that but i'm just rotating in the same point
Posted
Comments
[no name] 18-Jul-12 17:37pm    
Did you set the textbox to multiline?

Make sure the "Multiline" property of the textbox is set to true, and do something like:
C#
textbox1.Text = yourString.Replace(" ", "\n")


(The \n may need to be \r\n, I don't remember how TextBox handles it.)
 
Share this answer
 
Assuming that you have set the multiline property of the Textbox to true.

VB
Textbox1.Text = "This is a " & Environment.Newline & "Test to see if it works"
 
Share this answer
 
VB
Textbox1.text = textbox1.text.replace( " ", vbcrlf )
 
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