RE: [DUG]: Tbitbtn.Font.Style:=fsBold;
The Style property is a set, so it can contain multiple values. For example, a font could be both boldfaced and italicised. In your case write: ToAll1.Font.Style := [fsBold]; Cheers, John Christenhusz > -Original Message- > From: Alistair George [mailto:[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
Re: [DUG]: Tbitbtn.Font.Style:=fsBold;
Um I think it's a set... TFontStyle is the enumeration and TFontStyles is the set of that enumeration. So you need to add fsBold to the set of selected styles. ToAll1.Font.Style := ToAll1.Font.Style + [fsBold]; I think there is an include notation include(ToAll1.Font.Style,fsBold); but this only works with immediate (non property) operands (IIRC)... -- Aaron Scott-Boddendijk Jump Productions (07) 838-3371 Voice (07) 838-3372 Fax -Original Message- From: Alistair George <[EMAIL PROTECTED]> To: Multiple recipients of list delphi <[EMAIL PROTECTED]> Date: Wednesday, 31 March 1999 09:22 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
RE: [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?? Font.Style is a set. You need to do ToAll1.Font.Style:=[fsBold]; Cheers, Kuet-Fung. --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
RE: [DUG]: Tbitbtn.Font.Style:=fsBold;
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
RE: [DUG]: Tbitbtn.Font.Style:=fsBold;
TfontStyles is a set of TFontStyle elements try using ToAll1.Font.Style:=[fsBold]; Tim > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On > Behalf Of Alistair George > 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