Solved

Different font

Posted on 2001-07-05
6
228 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
[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
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

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…
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…
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…

691 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