How enter multi lines text in desgin time

A

ad

I have set a TextBox to MultiLines and set the rows to 10.
I assigned the Text of the TextBox some lins of text at desgin time,
but only the first line remain in the TextBox.

How can I assign some lines of text at desgin time?
 
G

Guest

Hello ad,

I'm not really sure what you're asking but I think you might be trying to
add more than one line of text to the multiline textbox. You can do that
using one of the following techniques:

1) Add the lines to the text already in the box:
TextBox1.Text = "The first bit of text. ";
TextBox1.Text += "Another bit or text. ";
TextBox1.Text += "Still more.";

2) If you're adding alot of text often, you might want to use the
StringBuilder class. Add the text to a StringBuilder object and then assign
that text to the TextBox.Text property.

If you're asking how to add new rows of text, then you'll want to look at
the \n newline escape character.
 
A

ad

Thanks,
But I mean add mutli line to a TextBox at desgin time.
For example, I have two lines below:
This the fist line.
This the sceond line.

How can I add these to line to a TextBox at desgin time.
 
D

Damien

ad said:
Thanks,
But I mean add mutli line to a TextBox at desgin time.
For example, I have two lines below:
This the fist line.
This the sceond line.

How can I add these to line to a TextBox at desgin time.
Switch to HTML view. Inside the textarea element, put the exact text
you want to appear (including newlines, tabs, etc)?

Damien
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top