Solved

Different font

Posted on 2001-07-05
6
200 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
What Security Threats Are You Missing?

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.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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