Delphi-PRAXiS
Seite 1 von 2  1 2      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   Eine allgemeine Frage zum Verständnis, warum negative Font.Height ? (https://www.delphipraxis.net/189374-eine-allgemeine-frage-zum-verstaendnis-warum-negative-font-height.html)

Jörgi 7. Jun 2016 08:51

Eine allgemeine Frage zum Verständnis, warum negative Font.Height ?
 
Hallo DB´ler,

ich habe neulich in einer .pas folgenden Ausdruck in der Constructoranweisung gelesen:

Delphi-Quellcode:
Font.Height := -11;
Was bezweckt man denn mit einer negativen Fonthöhe ?

Frage rein Inreresse halber, da ich nicht weiß, wann und warum man soetwas benutzt :wiejetzt:


Beste Grüße,

Jörg

bra 7. Jun 2016 08:57

AW: Eine allgemeine Frage zum Verständnis, warum negative Font.Height ?
 
Die Fonts sind auch in der IDE als negative Werte angegeben. Wieso, weiß ich auch nicht, fand ich auch immer merkwürdig.
Google hilft:

http://www.delphipages.com/forum/sho...d.php?t=120942
Zitat:

You must work with TFont.Size but not with TFont.Height

Height property calculated automatically:
Font.Height = -Font.Size*Font.PixelsPerInch/72

So the Size is a size of the font in points, the Height is in pixels.

From help-file:
*********************************
If the value is negative, the internal leading that appears at the top of each line of text is not measured. If the value is positive, Height represents the height of the characters plus the internal leading.
*********************************

Jörgi 7. Jun 2016 09:18

AW: Eine allgemeine Frage zum Verständnis, warum negative Font.Height ?
 
Danke ! :thumb:

himitsu 7. Jun 2016 09:39

AW: Eine allgemeine Frage zum Verständnis, warum negative Font.Height ?
 
Wieso Google?
Warum wird das arme F1 ständig ignoriert.

Sherlock 7. Jun 2016 09:49

AW: Eine allgemeine Frage zum Verständnis, warum negative Font.Height ?
 
Zitat:

Zitat von himitsu (Beitrag 1339639)
Wieso Google?
Warum wird das arme F1 ständig ignoriert.

Vielleicht weil das Vertauen angesichts des inflationären Gebrauchs der Floskel
Zitat:

"Embarcadero Technologies verfügt zurzeit über keine zusätzlichen Informationen."
geschwunden ist?

Sherlock

himitsu 7. Jun 2016 09:55

AW: Eine allgemeine Frage zum Verständnis, warum negative Font.Height ?
 
Falls Jörgi immernoch sein gutes altes Delphi 5 benutzt, dann funktioniert diese Taste bei ihm noch. :angle2:

Es gibt Dinge, die sind soooooo alt, daß sie schon vor Codegear/Embarcadero in die OH aufgenommen wurden. :stupid:

bra 7. Jun 2016 10:11

AW: Eine allgemeine Frage zum Verständnis, warum negative Font.Height ?
 
Zitat:

Zitat von himitsu (Beitrag 1339639)
Wieso Google?
Warum wird das arme F1 ständig ignoriert.

Bevor ich in der grauenvollen und meist unvollständigen Hilfe von Delphi was gefunden habe, hab ich das bei Google zigmal und meist ausführlicher gefunden.

himitsu 7. Jun 2016 10:16

AW: Eine allgemeine Frage zum Verständnis, warum negative Font.Height ?
 
Und was hast du in Google nun gefunden?

Genau, die Online-Version der OH. :lol:
PS: http://www.delphipraxis.net/dp_reference.php (auch gut als Suchprovider im Browser)

bra 7. Jun 2016 10:56

AW: Eine allgemeine Frage zum Verständnis, warum negative Font.Height ?
 
Wenn ich in der IDE F1 drücke, lande ich bei Height von TComponent, was mich Null weiterbringt. Ehe ich mich jetzt bis zu dem durchgehangelt habe, was ich tatsächlich brauche, suche ich doch lieber über Google.

himitsu 7. Jun 2016 11:16

AW: Eine allgemeine Frage zum Verständnis, warum negative Font.Height ?
 
Wo in der IDE? (Objektinspektor oder Quellcode)

Und immernoch Delphi 5?
In Delphi 7 und in den neueren IDEs ab 2005/2006 landete man in TFont.Height, vorm OI aus und über die manuelle Index-Suche der OH wird das auch aufgelistet.


Alle Zeitangaben in WEZ +1. Es ist jetzt 13:17 Uhr.
Seite 1 von 2  1 2      

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-2025 by Thomas Breitkreuz