Solved

Different font

Posted on 2001-07-05
6
209 Views
Last Modified: 2013-12-03

Hi,
is it possible to have differents fonts in a single string ?
I mean, I want Label1.Caption := 'Hello Word'  but with
the 'W', or any other letter in a different font.  Is it possible ???
Thank you.
0
Comment
Question by:frdep
6 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6255839
not with TLabel i guess

but go to

www.torry.ru

gueesing you will find there a free component,
whery this may possible

meikl ;-)
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 6255863
Get TjanMarkupLabel from:

http://jansfreeware.com/jfdelphi.htm
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 6255871
Or better, TRTFLabel from http://www.tmssoftware.com
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 1

Accepted Solution

by:
h_mohsenian earned 50 total points
ID: 6256309
Use TRichEdit and For An Example of Use See RichEdit Standard Delphi Demo ( In Demo Folder ).

also TRTFLabel that Epsylon said is a RichLable with the same properties of RichEdit.
0
 
LVL 1

Expert Comment

by:alx512
ID: 6259447
You can use this code.
Insert the TPaintBox on the Form and then
write OnPaint event handler:

procedure TForm1.PaintBox1Paint(Sender: TObject);
var
  X, Y: Integer;
begin
  with PaintBox1.Canvas do
  begin
    Brush.Color := clBtnFace;
    FillRect(ClipRect);
    Font.Name  := 'Tahoma';
    Font.Style := [fsBold];
    Font.Size  := 12;
    X := 1;
    Y := PaintBox1.Height - TextHeight('H');
    TextOut(X, Y, 'H');
    X := X + TextWidth('H');
    Font.Name  := 'Verdana';
    Font.Size  := 10;
    Font.Style := [];
    Y := PaintBox1.Height - TextHeight('ello world!');
    TextOut(X, Y, 'ello world!');
  end;
end;
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 6259673
Huh?
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

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
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.

813 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

13 Experts available now in Live!

Get 1:1 Help Now