TFontStyles is a set.
ToAll1.Font.Style is of type TFontStyles.
TFontStyle is only an item that may appear in the set TFontStyles.
fsBold is a TFontStyle.
[fsBold] is a set of TFontStyle and is therefore compatible with
TFontStyles.
Therefore use:
ToAll1.Font.Style := [fsBold];
OR
ToAll1.Font.Style := ToAll1.Font.Style + [fsBold];
If Font.Style was a variable, and not a property (which cannot be passed as
a var parameter), you could
say:
Include(ToAll1.Font.Style,fsBold);
Regards,
Andrew Cooke.
> -----Original Message-----
> From: Alistair George [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, March 31, 1999 9:14 AM
> To: Multiple recipients of list delphi
> Subject: [DUG]: Tbitbtn.Font.Style:=fsBold;
>
> When I apply the above as
> ToAll1.Font.Style:=fsBold;
> I get a compiler error: incompatible types: Tfontstyles and Tfontstyle
> Whats the story??
> thanks,
> Alistair+
> --------------------------------------------------------------------------
> -
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz