visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Languages :: Delphi :: RichEdit&selection color


By: ginsonic Romania  Date: 19/07/2003 00:00:00  English  Points: 300 Status: Answered
Quality : Excellent
How can I change the selected text color ? As can be done for combobox or dbgrid .
By: VGR Date: 19/07/2003 06:35:00 English  Type : Answer
http://beta.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_10205638.html
By: ferhad Date: 19/07/2003 08:11:00 English  Type : Comment
hi ginsonic
Hope the following code will help you
RichEdit1.SelAttributes.Color := FontDialog1.Font.Color;
Regards Ferhad
By: ginsonic Date: 19/07/2003 15:10:00 English  Type : Comment
VGR , I have already this tip but I don't wish to change the system color. I wish to leave the rest of applications to use default color and just mine to have clRed ( for example ).

ferhad, I tested your code but nothing happening.


By: esoftbg Date: 20/07/2003 19:55:00 English  Type : Comment
RichEdit.SelStart := 4;
RichEdit.SelLength := 2;
RichEdit.SelAttributes.Color := clRed;

emil
By: ferhad Date: 21/07/2003 11:23:00 English  Type : Comment
First u should select something in RichEdit than in onclick of button type the following code

RichEdit.SelAttributes.Color := clRed

it should work
By: ginsonic Date: 22/07/2003 13:40:00 English  Type : Comment
I wish to have this color when I select the text and not to select with black and then to click a button to get a red one :(
By: ginsonic Date: 22/07/2003 13:44:00 English  Type : Comment
BTW, RichEdit.SelAttributes.Color don't change the selection color but the selected text color.
By: DragonSlayer Date: 22/07/2003 15:09:00 English  Type : Comment
I guess you should've said the "highlight colour", ginsonic :)

but then, I dunno how to do it without doing a system-wide change either :(
By: ginsonic Date: 23/07/2003 13:58:00 English  Type : Comment
Maybe something alike when the mouse button is down to get the selstart, when move the mouse get the endsel and change the background color and font for selected text. I think that is possible but , for moment I don't know how ( is my first richedit application) and don't have time to study..yet

Do register to be able to answer

EContact
browser fav
page generated in 355.845930 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page