开发者

How do you change the color of specific characters in a rich edit in Delphi? [duplicate]

This question already has an answer here: 开发者_StackOverflow中文版Closed 11 years ago.

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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜