473,473 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How enter multi lines text in desgin time

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?

Aug 7 '06 #1
3 1427
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.
--
enjoy - brians
http://www.limbertech.com
"ad" wrote:
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?

Aug 7 '06 #2
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.
"brians[MCSD]" <br********@discussions.microsoft.com¼¶¼g©ó¶l¥ó·s» D:14**********************************@microsoft.c om...
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.
--
enjoy - brians
http://www.limbertech.com
"ad" wrote:
>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?


Aug 8 '06 #3

ad wrote:
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

Aug 8 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mr.Baha | last post by:
Hello, I have a situation where I am appending text to a multi-line (rich)textbox in a C# form. Now depending on which event does the appendtext, i want to distinguish the lines in the textbox by...
3
by: Jow Blow | last post by:
I am trying to make a word wrap type function for a multi line text box field that will be saved to a text file. The word wrap property looks good in the app but when saved to a text file the line...
6
by: CindyH | last post by:
Hi Does anyone know how to create a multi column combo box from the same table? Thanks, Cindy
6
by: Clark Sann | last post by:
Can someone help me understand what object should be used as the lock object? I've seen some programs that use Monitor.Enter(Me). Then, in those same programs, they sometimes use another object. ...
4
by: zoneal | last post by:
I have a multi line textbox with word wrap enabled. Is it possible to write code to check if the text of the textbox has continued into the next line and then count the amount of lines? If not...
4
by: PraveenKadkol | last post by:
Hi, My Development is in almost final stages, now i am facing problem with the reports. I am generating MsAccess Reports based on the selected Parameters, while generating Report I am opening ...
2
by: BillE | last post by:
I need to create a multi-line label dynamically. Since labels aren't multi-line, I'm creating a textbox and making it look like a label with the multiline property set to true. I want to...
3
by: Simon Verona | last post by:
Sorry for the repost, but this group seems to be more "active" than the group that I posted my question, and it's probably as valid here as there! I have a usercontrol, which contains a textbox...
1
by: todWulff | last post by:
Good day folks. Let me open with the statement that I am not a C++/C programmer. The environment that I am programming in is ARMbasic, an embedded BASIC targeted toward ARM-based...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.