If SpBtnBold.Down then
  Image.Canvas.Font.Style := [fsBold];

Or
If SpBtnBold.Down then
  Image.Canvas.Font.Style := Image.Canvas.Font.Style + [fsBold];

To remove
Image.Canvas.Font.Style := [fsBold];
Or
Image.Canvas.Font.Style := Image.Canvas.Font.Style - [fsBold];

Regards

Sean Cross
IT Systems Development Manager

Catalyst Risk Management
PO Box 230
50 Dalton St
Napier 4140
DDI: 06-8340362
mobile: 021 270 3466
Visit us at http://www.catalystrisk.co.nz/

Offices in Auckland, Napier, Wellington & Christchurch

Disclaimer:
"The information contained in this document is confidential to the addressee(s) 
and may be legally privileged. Any view or opinions expressed are those of the 
author and may not be those of Catalyst Risk Management. No guarantee or 
representation is made that this communication is free of errors, viruses or 
interference. If you have received this e-mail message in error please delete 
it and notify me. Thank you."


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Nesler, Thomas J
> Sent: Thursday, 26 July 2007 8:05 a.m.
> To: Borland's Delphi Discussion List
> Subject: Changing a canvas's Style property to Bold and back
>
> Hello!
>
> I am creating a simple paint program for an application.  I need to be
> able to turn on and off the Bold property of the font.
>
> Here is my code:
>
> If SpBtnBold.Down then Image.Canvas.Font.Style := fsBold ;
>
> When doing a syntax check I get this error message:
>
> [Error] GraphWin.pas(356): Incompatible types: 'TFontStyles' and
> 'TFontStyle'
>
> What am I doing wrong?
>
> Also, looking in the help text I see the style fsBold but I don't know
> how to 'UnBold' my font.  What should I use to reverse this style?
>
> Thanks in advance!
>
> Tom Nesler
>
>
> _______________________________________________
> Delphi mailing list -> [email protected]
> http://www.elists.org/mailman/listinfo/delphi
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to