How do you change the color of specific characters in a rich edit in Delphi? [duplicate]
Possible Duplicate:
How can I change the color of certain characters in a TRichEdit?
I have to do a project in which I have to either change the color of specific individual characters in a line in a rich edit to random colors or change the color of a whole line in a rich edit to random colors . Is it possible to keep randomly changing the color of a string or character which appears in the rich edit and how ? The colors have to keep flickering too to give a constant blinking effect like lights flashing on and off in the rich edit . Any help would be appreciated .
Yes, you can change all the attributes of selected portions of text in a RichEdit (font, size, color, style) whenever you want at runtime by selecting that area (with SelStart and SelLength) and changing the attributes (with SelAttributes).
精彩评论