Wednesday, 18 September 2013

populate combobox with items on single line of text file

populate combobox with items on single line of text file

I have a line of text A;B;C;D; in a text file. what I'm wanting to achive
is to populate a combobox so that it reads as follows A B C D
Using the ; char as a way to define a new combobox entry.
its supose to work in combination with the following code...
For Each line As String In IO.File.ReadAllLines("C:\TEST.txt")
If line.StartsWith("<dep>") Then
ComboBox1.Text = line.Substring(5)
End If
which selects a tag from a file with alsorts of stored data (in this case
the tag and usses this to populate the combobox...
dose anyboy know how?
I'm ussing vb.net

No comments:

Post a Comment