Searching a RichTextBox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have a richtextbox and I want the users to be able to search for text within the control. I would think that the richtextbox.find() would work, but I can't figure out how to get the textbox to scroll down and highlight the search text. Any suggestions?
 
* =?Utf-8?B?VGltIFNtaXRo?= said:
I have a richtextbox and I want the users to be able to search for
text within the control. I would think that the richtextbox.find()
would work, but I can't figure out how to get the textbox to scroll down
and highlight the search text. Any suggestions?

Select the portion of text by calling the overloaded version of the
control's 'Select' method, then call its 'Focus' method followed by a
call to its 'ScrollToCaret' method.
 
Back
Top