Solved

change the font style color of a selected text of richedit

Posted on 2003-11-14
5
673 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

786 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