Re: HELP: Rich Text Boxes
For 3 use the replace command.
Code:
RichTextBox1.Text = RichTextBox1.Text("Text to Be Replaced", "Text to Replace with")
And could you give an example for 2? It doesn't make much sense.
Re: HELP: Rich Text Boxes
That doesn't work and an example for number 2 is this:
Ok lets say i have a peice of text:
Code:
Hi, Grandma lets go to the shop
but i wanted to just find i want it to find this text then select it (highlight it)
This is what doesn't work about it: i have this but it doesn't work
Code:
RTB1.Text = RTB1.Text(Find_TB.Text, Replace_TB.Text)
Re: HELP: Rich Text Boxes
Do you want to simply highlight Grandma lets go, or do you want for all the text except for Grandam lets go to be removed? If all you want to do is highlight it, use this:
Code:
Dim theText As String = "happy burger"
RichTextBox1.Select(RichTextBox1.Text.IndexOf(theText), theText.Length)
RichTextBox1.Focus()
Also, could you be more descriptive about whats wrong with 3? The code I gave you works perfectly fine for me, is it not doing what you want, is it giving you an error, what's "wrong" with it?
As for 1:
Code:
RichTextBox1.Font = New Font("Arial", RichTextBox1.Font.Size, RichTextBox1.Font.Style)
To change the font you have to set the size and style, this will only change the font though as you can set it to remain the same.