473,382 Members | 1,377 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,382 software developers and data experts.

Using Multiline on a text box

How do I fill a text box with multiply lines of text from
code?
Nov 20 '05 #1
5 1041
* "Brian L" <br********@hotmail.com> scripsit:
How do I fill a text box with multiply lines of text from
code?


\\\
Me.TextBox1.Text = _
"Hello" & ControlChars.NewLine & _
"World"
///

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
Brian L wrote:
How do I fill a text box with multiply lines of text from
code?


Hi Brian,

TextBox1.MultiLine = True
TextBox1.Text = "Test" & Environment.NewLine & "Test2"
or
TextBox1.Text = "Test" & vbNewLine & "Test2"
or
TextBox1.Text = "Test" & vbCrLf & "Test2"

Cheers

Arne Janning
Nov 20 '05 #3
Hi Herfried,

A nice sample, much better than the samples Arne gave.

Although the VbNewLine sample from Arne is much easier to remember, is it in
my opinion in your way much easier to convert VB.net programs in future to
C#.
\\\
Me.TextBox1.Text = _
"Hello" & ControlChars.NewLine & _
"World"
///


Cor
Nov 20 '05 #4
Hi Cor,

* "Cor Ligthert" <no**********@planet.nl> scripsit:
A nice sample, much better than the samples Arne gave.

Although the VbNewLine sample from Arne is much easier to remember, is it in
my opinion in your way much easier to convert VB.net programs in future to
C#.


It's actually /not/ easier, because 'ControlChars' is part of the VB.NET
Runtime Library. I think you are referring to 'Encironment.NewLine'
which is part of the BCL.
\\\
Me.TextBox1.Text = _
"Hello" & ControlChars.NewLine & _
"World"
///


--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #5
Hi Herfried,

You are absolutly right, however you know why the message was written and to
add something to that, is environment in the German language encironment?

(I know I make them much more than you, you see it with this message)

However I could not resist because that funktion.

:-)

(Hi Arne, it was not actualy true what I was writting, however Herfried is
seldom using code from the single dotNet namespace when there is a
Microsoft.VisualBasic equivalent and therfore I wrote this, however again as
usual when I do this to a regular, without good looking to it).

Cor
Nov 20 '05 #6

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

Similar topics

0
by: sinasalek | last post by:
i have a problem below code : <?php $text=' <html dir="rtl"> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html;
1
by: trapeze.jsg | last post by:
Hi. I am trying to get through to Microsoft MapPoint Services using ZSI for soap handling. I can generate the service classes and also the soap-requests generated by the service classes seem to...
4
by: Michael C | last post by:
Hi all, I'm trying to add lines to a multiline textbox. Here's what I'd like to end up with in the textbox (as an example): Line1 Line2 Line3 I've tried a couple of methods but nothing...
7
by: Joel Finkel | last post by:
Folks, I have a form that has several TextBoxes, some of which have the TextMode set to MultiLine. Each is pre-loaded with data from a database. The user is allowed to modify each entry. The...
2
by: Enzo Marinelli | last post by:
Hello everyone I have a MultiLine TextBox, as follows <asp:TextBo Id="StreetAddress Rows="4 Runat="Server TextMode="MultiLine Width="100%"/
9
by: John Salerno | last post by:
How do you make a single string span multiple lines, but also allow yourself to indent the second (third, etc.) lines so that it lines up where you want it, without causing the newlines and tabs or...
0
by: prisesh26 | last post by:
hi friends, iam doing a proj on web app . help me, how to add a multiline text in a list box.. iam ve ing a listbox and a text box.. wat ever i typed in multiline text box it must get added...
7
by: Anil Gupte | last post by:
I have read a lot about getting lines from a multiline textbox in VB.Net. However, I cannot for the life of me figure out how to write to a multiline textbox. Basically, I have created an array of...
2
by: Nathan Sokalski | last post by:
I have a multiline TextBox that I want to display the text used to create a control in an apsx file. I want each of these to be on a separate line in the TextBox. The only way I know of to place...
2
by: King | last post by:
Is there any other way to define multiline text in a XML file: <Help><!]> </Help>
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...

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.