none
Rich text box text finding RRS feed

Answers

  • I have arrived up to this... but I know this is not a perfect one..  In this example I need to highlight all the occurence of "INSERT".

     

    int iq=0;

    for(int it=0;it<5000;it++)

    {

    iq = richTextBox1.Find("INSERT",iq,RichTextBoxFinds.None);

    if(iq == -1)

    {

    break;

    }

    richTextBox1.Select(iq,6);

    richTextBox1.SelectionColor = Color.Blue;

    }

    can anyone please tell me better way than this?

     

    Also is there any way to change the background color of the selected text(rich text box)  in  C# .net 1.1 and Selecting the entire row of the richtextbox where the searched word is found.

     

    With Regards

    B.Ananthvivek

     

    Friday, September 26, 2008 2:00 PM