Solved

change the font style color of a selected text of richedit

Posted on 2003-11-14
5
676 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 Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

830 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