Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


adding to textbox help filter_list
Author
Message
adding to textbox help #1
hey everyone, is it posible for me to select a certain line in a rch textbox for me to add to so

a code like

RichTextBox1.Text = RichTextBox1.Text.line3 & ("current text")

obviously that wont work, but ho would i be able to do that.
[Image: 6caf54.gif]

Reply

RE: adding to textbox help #2
Load and split the RichTextBox in a String Array in newlines.

Code:
Dim ArrLine As String() = Split(RichTextBox1.Text, vbNewLine)
MessageBox.Show(ArrLine(2)) 'Get Third line
[Image: rytwG00.png]
Redcat Revolution!

Reply

RE: adding to textbox help #3
thanks for your help but that doesnt work, it says (Index was outside the bounds of the array.) error
[Image: 6caf54.gif]

Reply

RE: adding to textbox help #4
well of course you need more than 3 lines of text in the RichTextBox for that to work.
[Image: rytwG00.png]
Redcat Revolution!

Reply

RE: adding to textbox help #5
but thats the thing i have more than 3 i have about 12 lines confused
[Image: 6caf54.gif]

Reply

RE: adding to textbox help #6
This should work, didn't know RichText had different linebreaks.

Code:
Dim ArrLine As String() = RichTextBox1.Lines
Me.Text = ArrLine(2) 'Get Third line
[Image: rytwG00.png]
Redcat Revolution!

Reply







Users browsing this thread: 1 Guest(s)