highlighting multiple words in a RTB

  • Thread starter Thread starter njuneardave
  • Start date Start date
N

njuneardave

I know that there is an rtb.SelectionStart and rtb.SelectionLength
where you can set the length and beginning index of highlight in an
RTB. but, say I wanted to highlight multiple items at once (for
example, go to MS word.... type in the same word a few times and then
highlight what you typed. then CTL+F for the Find window, and try to
find that word "in selection range". every instance of the word can be
highlighted.) I want to do the same thing.

I know that the pre-defined rtb.Find() method will highlight a word in
a range if it is equivalent to your search key, but can you highlight
all words that match the key at the same time?


Thanks in advance for your help.
 
njuneardave said:
I know that there is an rtb.SelectionStart and rtb.SelectionLength
where you can set the length and beginning index of highlight in an
RTB. but, say I wanted to highlight multiple items at once (for
example, go to MS word.... type in the same word a few times and then
highlight what you typed. then CTL+F for the Find window, and try to
find that word "in selection range". every instance of the word can be
highlighted.) I want to do the same thing.

I know that the pre-defined rtb.Find() method will highlight a word in
a range if it is equivalent to your search key, but can you highlight
all words that match the key at the same time?


Thanks in advance for your help.

Hi njuneardave,

I'm afraid that's not possible with the RichTextBox. Microsoft Word doesn't
use a standard windows control.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top