Solved

change the font style color of a selected text of richedit

Posted on 2003-11-14
5
671 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
  • 3
5 Comments
 

Accepted Solution

by:
Kumao earned 85 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
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…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now