Ryan Turney

Ryan Turney

  • NA
  • 245
  • 208.8k

Finding

Aug 12 2007 2:20 PM

Hello, I am having problems with creating find function. I can get the code to find starting from the top going down, but I haven't been able to reverse that, take a look.

 

else if (upRadioButton.Checked == true)

{

   try

   {

      rtb.Select(rtb.Text.Length, length);

      // rtb.Select(searchindex - 1, length);

      searchindex = temp.LastIndexOf(textBox1.Text, searchindex);

      rtb.Select(searchindex, length);

      rtb.Focus();

      searchindex += length;

      }

   catch (Exception e)

   {

      MessageBox.Show(e.Message);

   }

}

 

Thanks for any help you can give, this should be simple. I'm just having a "I don't get it day".


Answers (3)