This line of code will make the Find method search for a search key in a given range if you search from top to bottom:
m_form.richTextBox1.Find(searchKey, searchDownAreaStart, searchDownAreaEnd, RichTextBoxFinds.WholeWord | RichTextBoxFinds.MatchCase);
I tried this code to make the Find method search from the bottom up (like, find the first instance of the word, starting from the bottom of the richTextBox and going to the first index of 0.):
m_form.richTextBox1.Find(searchKey, searchUpAreaStart, searchUpAreaEnd, RichTextBoxFinds.WholeWord | RichTextBoxFinds.MatchCase);
where:
int searchUpAreaStart = richTextBox1.Text.Length // initially
searchUpAreaStart = m_form.richTextBox1.Find(searchKey, searchUpAreaStart, searchUpAreaEnd, RichTextBoxFinds.WholeWord | RichTextBoxFinds.MatchCase); // index of keyword found
int searchDownAreaEnd = 0;
So this doesn't work. What could I do to make it search from the bottom up?
Thanks in advance!