I have a quick question, I have a textbox that the user inputs information into. Then they click a button it adds all the text into a listview on another form. So far I have done this and it is working great.
Some of the items in the textbox contain tags such as <k>teststring</k>
I would like for the program to be able to take the full string between the tag and add it to the listview with a tag. So when then user can see it in the listview the text just says "code string", but it is still the same item. The reason for doing this is that these string can be on multiple lines so when I add it to the listview it adds on multiples lines and is too long.
This is the code im using to add the text items to the list. It adds numbers to the lines in the first column as well. I know I need to user a if then statement to check for the tags somehow and if there add the current item to the listview. Although I need to keep it in the same order as it appears on the textbox. Thanks in advance.
Some of the items in the textbox contain tags such as <k>teststring</k>
I would like for the program to be able to take the full string between the tag and add it to the listview with a tag. So when then user can see it in the listview the text just says "code string", but it is still the same item. The reason for doing this is that these string can be on multiple lines so when I add it to the listview it adds on multiples lines and is too long.
This is the code im using to add the text items to the list. It adds numbers to the lines in the first column as well. I know I need to user a if then statement to check for the tags somehow and if there add the current item to the listview. Although I need to keep it in the same order as it appears on the textbox. Thanks in advance.
VB.NET:
[LEFT][COLOR=#000000]
Dim splitcode() As String = Me.ScriptEditor.Text.Split(New String() {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries)[/COLOR][/LEFT]
For i = 0 To splitcode.Length - 1 PlayEvents.ListView1.Items.Add(New ListViewItem({i.ToString, splitcode(i)})) [LEFT][COLOR=#000000] Next
[/COLOR][/LEFT]
[COLOR=#000000][FONT=verdana]
[/FONT][/COLOR]