Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Change the style of a TLabel in C++ Builder

859 views
Skip to first unread message

Honeywell Gerds

unread,
Nov 6, 1997, 3:00:00 AM11/6/97
to

Hello,

I do this in Delphi, the syntax is :

Label1.Font.Style := [fsBold,fsItalic];

How may I do that with C++ Builder ??

PS: I try that but it doesn't work:
Label1->Font->Style << fsBold << fsItalic;
and that Label1->Font->Style << fsBold | fsItalic;

Best Regards.
F. COURTAULT

PIQUOT Jérôme

unread,
Nov 6, 1997, 3:00:00 AM11/6/97
to

did you try:

Label1->Font->Style = Label1->Font->Style << fsItalic;


--
__________________________________________
PIQUOT Jérôme
STRASBOURG
FRANCE
http://www.media-net.fr/~wolff
mail:wo...@mail.media-net.fr
__________________________________________
Honeywell Gerds a écrit dans le message <01bcea91$16eb2d00$ae0100c0@tg14>...

Vito Adamo

unread,
Nov 6, 1997, 3:00:00 AM11/6/97
to

Honeywell Gerds wrote:

> Hello,
>
> I do this in Delphi, the syntax is :
>
> Label1.Font.Style := [fsBold,fsItalic];
>
> How may I do that with C++ Builder ??
>
> PS: I try that but it doesn't work:
> Label1->Font->Style << fsBold << fsItalic;
> and that Label1->Font->Style << fsBold | fsItalic;
>
>
> Best
> Regards.
> F.
> COURTAULT

Hi
I Havent ever tried this with the fonts, but it should work with the
right TObject for fonts;
I did this for a String Grid...

TGridOptions NonEditOp << goFixedVertLine <<
goFixedHorzLine << goVertLine << goHorzLine;

TStringGrid SearchGrid;
SearchGrid->Options = NonEditOp;

Good luck!

Vito \o/


Cristian Ormazabal

unread,
Nov 22, 1997, 3:00:00 AM11/22/97
to

> PS: I try that but it doesn't work:
> Label1->Font->Style << fsBold << fsItalic;
> and that Label1->Font->Style << fsBold | fsItalic;
Do the following
Label1->Font->Style = TFontStyles() << fsItalic << fsBold;
Cristian

0 new messages