Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

change the font style color of a selected text of richedit

Posted on 2003-11-14
5
Medium Priority
?
679 Views
Last Modified: 2013-12-03
i asked a question about 10 minuts ago kretzschmar answer it
here is another question from the same project

i have a richedit and i want to be able to change the font style or color
and not changing  all the text in it

more detail:
i hilight some text from the document and i have a button when i push it for example it will change the selected text to bold or chang its color to green .
0
Comment
Question by:amjedmsa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 

Accepted Solution

by:
Kumao earned 255 total points
ID: 9746013
procedure TForm1.Button1Click(Sender: TObject);
begin
  with RichEdit1.SelAttributes do begin
    Style := [fsBold];
    Color := clGreen;
  end;
end;
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 9746016
hi, itsme again :-))

procedure TForm1.Button3Click(Sender: TObject);
begin
  richedit1.SelAttributes.Style := [fsBold];
  richedit1.SelAttributes.Color := clGreen;
end;

meikl ;-)
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 9746019
puuuh, too late :-((
0
 

Author Comment

by:amjedmsa
ID: 9746041
kretzschmar i am very sorry i cant give  it to u he came first how ever i realy like ur first answer u rock man
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 9746069
:-)) its ok
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question