473,385 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

TextBox for multiple lines of text strings

Hi,

I have a TextBox, textAddress, that's defined as an array of text
strings.

Currently I only have a single line of text in it:

textAddress.Text = "100 America Avenue, New York, NY
12300";

However, I want to add another line for a name, such as "Mr. John
McAdams". I guess I'll need to create an array that contains both
strings (name and address). How can I get both strings displayed on
separate lines in textAddress in C# code?

Thanks!

-Emily

Jan 4 '07 #1
1 1655
In c# the string "\r\n" is equal to VB's vbCrLf

That steps any line of text to the next line. O, and don't forget to set the
multiline proporty on your text box.

David

"Fir5tSight" wrote:
Hi,

I have a TextBox, textAddress, that's defined as an array of text
strings.

Currently I only have a single line of text in it:

textAddress.Text = "100 America Avenue, New York, NY
12300";

However, I want to add another line for a name, such as "Mr. John
McAdams". I guess I'll need to create an array that contains both
strings (name and address). How can I get both strings displayed on
separate lines in textAddress in C# code?

Thanks!

-Emily

Jan 5 '07 #2

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

Similar topics

28
by: kfrost | last post by:
I know this is probably simple but I have a C# form and the class for the form is called sbaSynch. I have a textbox name txtServerName. I'm creating a class to manipulate XML functions so I...
2
by: simon | last post by:
hello, new to vb.net, have a few questions about DataGrid. I have a dataGrid that is working pulling a dataset back from a stored proc and binding to the datagrid for display the datagrid's...
1
by: Developer | last post by:
VC++ 2005 Express Edition: I have a textBox with the properties: this->m_TextBox_Desc->Multiline = true; this->m_TextBox_Desc->WordWrap = true; this->m_TextBox_Desc->ScrollBars =...
10
by: garyusenet | last post by:
I have a multiline textbox. The size of the text box should be 75 characters wide, and 5 lines in height like this: - <---75 characters--> <---75 characters--> <---75 characters--> <---75...
0
by: Fir5tSight | last post by:
Hi, I have a TextBox, textAddress, that's defined as an array of text strings. Currently I only have a single line of text in it: textAddress.Text = "100 America Avenue, New York, NY...
6
by: =?Utf-8?B?SGFucyAtIERpYUdyYXBoSVQgLQ==?= | last post by:
Hi! sorry for a dumb question. I have a textbox where multiline=true and I want to set the scrolbar from none to vertical when the textbox have more then f.ex. 5 lines, or reverse. How can...
4
by: =?Utf-8?B?QmVuIFIu?= | last post by:
Hi, I've got a webservice that just returns a string, and in the middle of the string, I use a controlchars.newline. When I set this string to the text property of a textbox, it shows up as one...
9
by: Phill W. | last post by:
VB.Net 2005 SP1 Windows Forms Application What's the fastest way to append text to a TextBox? I have an application that monitors data written to text files. It needs to scan some fairly...
10
by: karan1981 | last post by:
Hi, I have a user control that has a textbox. This user control is placed in a form at runtime. This form gives a string to the user control and the textbox is to show this in multiple lines.(i...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.