Solved

Different font

Posted on 2001-07-05
6
216 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

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…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

829 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