|
-
July 21st, 2003, 06:52 AM
#1
Forecolor attribute individual character?
Hi all (again!),
Is it possible to change the forecolor of individual letters in a Rich Textbox? Suppose, for example, the user types "The cat in the hat". My program, interrogating the word before the space, detects "the" was typed. Looking up "the" in an array tells the program to change the "e" in "the" from black to blue, leaving "th" black.
Can it be done?
Thanks,
Mark
-
July 21st, 2003, 07:02 AM
#2
yes.
you can do it directly using RTF code, or indirectly by selecting the character (use selLength and selStart) then set the font colour of the text that has been selected.
Mike
-
July 21st, 2003, 07:05 AM
#3
Yes,, just locate and set the appropriate value for SelStart and SelLength, and then set the desired color in SelColor property of the RichTextBox..
Busy 
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
|