Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determining largest fontsize for a textbox
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00564266
Message ID:
00564352
Vues:
16
I think you do not take into account textbox border and textbox.margin.
Just in case, check Window/Form ScaleMode property and form textheight/Textwidth and txtwidth().

>Thanks, but honestly the thought of putting code in everything I write to make sure the user has basic fonts installed and changing all the fonts on all my forms if they don't seems like more work than it's worth. :) If they try to load a form and it gives an error that the font doesn't exist, they'll call me and we'll install the fonts.
>
>Anyway, back to my original question. I must be missing something here because the numbers aren't matching. I checked that both the form and the FONTMETRIC are in pixels, so that shouldn't be the problem. But the fontsize it's coming up with just doesn't fit.
>
>For example:
>
>The textbox is 15 by 15 pixels. According to FONTMETRIC, the biggest font that can fit in there is a 9 (15 H, 8 W). But a 15x15 textbox is tiny and the number doesn't come close to fitting with a fontsize of 9.
>
>I have a feeling I'm missing something obvious, but I'm just not seeing it.
>
>Thanks,
>
>Michelle
>
>
>>I am afraid you can be safe for sure with what wfont(1) returns only.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform