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

displaying delimited text

Ron
How do I display delimited text on multiple lines in a listbox?

For example in my textbox I have this:
Joe Doe,123 Street,Mytown

and In a listbox then I want to display:
Joe Doe
123 Street
Mytown

How would I step through that string and seperate the words by the
comma?

Feb 26 '07 #1
4 1214
On Feb 26, 9:43 am, "Ron" <pts4...@yahoo.comwrote:
How do I display delimited text on multiple lines in a listbox?

For example in my textbox I have this:
Joe Doe,123 Street,Mytown

and In a listbox then I want to display:
Joe Doe
123 Street
Mytown

How would I step through that string and seperate the words by the
comma?
Cation - air code follows:
listbox1.items.addrange(delimited.Split(",".ToChar Array()))

--
Tom Shelton

Feb 26 '07 #2
"Tom Shelton" <to*********@comcast.netschrieb:
>How do I display delimited text on multiple lines in a listbox?

For example in my textbox I have this:
Joe Doe,123 Street,Mytown

and In a listbox then I want to display:
Joe Doe
123 Street
Mytown

How would I step through that string and seperate the words by the
comma?

Cation - air code follows:
listbox1.items.addrange(delimited.Split(",".ToChar Array()))
.... ='delimited.Split(","c)'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Feb 26 '07 #3
Ron
so if my textbox is named textbox1 and my listbox is named
ltsdisplay, for the button that would make this all happen I would
just need to:

lstdisplay.items.textbox1(delimited.Split(",".ToCh arArray()))

is that right? or no? I try this and I get an error...
On Feb 26, 5:20 pm, "Herfried K. Wagner [MVP]" <hirf-spam-me-
h...@gmx.atwrote:
"Tom Shelton" <tom_shel...@comcast.netschrieb:
How do I display delimited text on multiple lines in a listbox?
For example in my textbox I have this:
Joe Doe,123 Street,Mytown
and In a listbox then I want to display:
Joe Doe
123 Street
Mytown
How would I step through that string and seperate the words by the
comma?
Cation - air code follows:
listbox1.items.addrange(delimited.Split(",".ToChar Array()))

... ='delimited.Split(","c)'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Feb 27 '07 #4
Ron wrote:
so if my textbox is named textbox1 and my listbox is named
ltsdisplay, for the button that would make this all happen I would
just need to:

lstdisplay.items.textbox1(delimited.Split(",".ToCh arArray()))

is that right?
Not quite.

"delimited" in the samples you've been given is the delimited string, which
in your case is "Textbox1.Text" (that's where the system gets the delimited
string from).

And also the code is more concise using Herfried's suggestion of how to
provide a character variable containing a comma.

Try this:

\\\
lstDisplay.Items.AddRange(Textbox1.Text.Split(","c ))
///

--

(O)enone
Feb 27 '07 #5

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

Similar topics

3
by: Ben | last post by:
Hi all - I am having a bit of trouble and thought maybe someone in this group could shed some light. Here's the skinny... I am creating an automated process to import a bunch of text files...
5
by: Amjad Farran | last post by:
What is the easiest way to display in a table, a delimited text data saved in a text file? I need an idea so that I can research it! Amjad
3
by: Joe Fisherman | last post by:
I have used regex to parse a huge text file, and grab a tab delimited portion of it. I often use comma delimited text files, and use Jet Oledb4. I read that I would need an ini if the file wasn't...
1
by: j7.henry | last post by:
I am trying to pull specific data that is in a comma delimited file into a web page. So if my comma delimited file looks like: Name,Address,Zip Fred,123 Elm,66666 Mike,23 Jump,11111 I would...
2
by: denisel | last post by:
Hi, We will be conducting surveys through SurveyMonkey online and will be importing the answers by tab delimited or comma delimited file into access. I was wondering if there is specific way to...
1
by: Fordraiders | last post by:
vb.net 2003 Office 2003 What I have: C:\TestData\Input.txt Text File Pipe Delimited : 4 columns Of data example: 00001|NO BRAND NAME ASSIGNED|6DU27|M3-.5 X 6 FLAT HD SOCKET CAP SCREW,...
2
by: Ron | last post by:
so if my textbox is named textbox1 and my listbox is named ltsdisplay, for the button that would make this all happen I would just need to: ...
6
by: =?Utf-8?B?UmljaA==?= | last post by:
'--this code works but only reads text into one column when contains multiple cols Dim ds1x As New DataSet Dim ConStr As String = _ "Provider=Microsoft.Jet.OLEDB.4.0;Data...
7
by: archana | last post by:
Hi all, I have csv file which i want to show into datatable. when i try to use oledb to copy content of csv file into datatable not all rows are getting copied into datatable. Some last rows...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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...
0
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...

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.