|
-
September 2nd, 2001, 03:16 PM
#1
changing the color of known words
hello all
I wanted to know, how to change the color of certain words in a rich text-box when a the user finishes to type the word (as in the VB editot where words like "end sub" are colored)
pleeease help
Meir
-
September 4th, 2001, 08:13 AM
#2
Re: changing the color of known words
You'll have to write code to find the words who's color you want to change, set the selStart and selLength properties so that this text is selected and then use the SelColor property... similar to...
private Sub Test()
RichTextBox1.SelStart = 1
RichTextBox1.SelLength = 10
RichTextBox1.SelColor = vbRed
end sub
-
November 26th, 2001, 09:35 PM
#3
Re: changing the color of known words
Trouble with this is that it highlights the word and if you immediately set the the sellength back to zero it will flicker.
Is there a more direct method, like using SendMessage(..) based on the current cursor location in the Richtextbox, that does not involve selecting the word ?
I can only please one person per day. Today is not your day. Tomorrow is not looking good either.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|