Jump to a specific line

  • Thread starter Thread starter René
  • Start date Start date
R

René

Hello
I'm developing a program in c# that uses a RichTextBox.
Now i wonder, how can i jump to a specific line in the document that is
shown in that richtextbox?

/René
 
René said:
Hello
I'm developing a program in c# that uses a RichTextBox.
Now i wonder, how can i jump to a specific line in the document that is
shown in that richtextbox?

/René
richTextBox1.Text="The cat jumped over the wall and fell on top of Spotty
the dog. He didn;t like that one bit.";
int loc = richTextBox1.Text.IndexOf("Spotty");
richTextBox1.SelectionStart= loc;
 
Back
Top