|
-
Oct 6th, 2011, 12:11 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] How to save the Richtextbox lines into a listbox?
I have a Richtextbox.Text in my project and I need to save all text lines into a ListBox.Text .
Can you help me please?
-
Oct 6th, 2011, 12:15 AM
#2
Re: How to save the Richtextbox lines into a listbox?
The Text of both controls is not relevant. The RTB has a Lines property, which returns a String array. The ListBox has a DataSource property and an Items.AddRange method, both of which will accept a String array.
-
Oct 6th, 2011, 01:19 AM
#3
Thread Starter
Hyperactive Member
Re: How to save the Richtextbox lines into a listbox?
My problem is that my app make search on google en extract the urls into the richtextbox but I want navigate to this sites and I need save these URLs into a listbox. I need to transfer the urls from the richtextbox to the listbox.
-
Oct 6th, 2011, 01:25 AM
#4
Re: How to save the Richtextbox lines into a listbox?
And I told you how it could be done. Now you just have to do it.
-
Oct 6th, 2011, 01:37 AM
#5
Thread Starter
Hyperactive Member
Re: How to save the Richtextbox lines into a listbox?
-
Oct 6th, 2011, 02:11 AM
#6
Thread Starter
Hyperactive Member
Re: [RESOLVED] How to save the Richtextbox lines into a listbox?
Sorry but I have problem with that I only getting the first lines (items).
Code:
Private Sub addlist_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles addlist.Click
Dim NewArray() As String = RichTextBox1.Text.Split(vbNewLine)
For Each item As String In NewArray
ListBox1.Items.Add(item)
Next
RichTextBox1.Text = ""
End Sub
Can you help me?
-
Oct 6th, 2011, 05:06 AM
#7
Re: [RESOLVED] How to save the Richtextbox lines into a listbox?
I already did help, but you apparently ignored it. There's not much point my posting the same thing again.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|