Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Tfont: rausfinden ob Bold etc (https://www.delphipraxis.net/70695-tfont-rausfinden-ob-bold-etc.html)

thetrue 2. Jun 2006 23:32


Tfont: rausfinden ob Bold etc
 
moin,

wie kann ich von der Eigenschaft TFont.Style rausfinden, ob fsBold oder fsItalic drinne vorhanden ist?

SirThornberry 2. Jun 2006 23:34

Re: Tfont: rausfinden ob Bold etc
 
das geht mit dem In-Operator
Delphi-Quellcode:
if (fsBold in Font.Style) then
  ShowMessage('Fett');

Luckie 2. Jun 2006 23:36

Re: Tfont: rausfinden ob Bold etc
 
So:
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
begin
  Label1.Font.Style := [fsBold];
  if fsBold in Label1.Font.Style then
    ShowMessage('Bold');
end;

thetrue 2. Jun 2006 23:39

Re: Tfont: rausfinden ob Bold etc
 
ok, danke :)


Alle Zeitangaben in WEZ +1. Es ist jetzt 17:08 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz