Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Resetting size of labels programmicly
Message
 
 
À
30/01/2003 11:14:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00746896
Message ID:
00747214
Vues:
31
This message has been marked as the solution to the initial question of the thread.
Beth,

In your code lcExpr changes to the French translation between calls to txtwidth() right?

I created a report dropped two labels on it: test and a much longer test made them arial 10 pt, opened the report.frx and see that the widths are 2291.667 and 11250 respectively. Then in the command window:

? txtwidth( "test", "arial", 10 )
? txtwidth( "a much longer test", "arial", 10 )
? 11250 / 18
? 2291.667 / 3.667

So the conversion factor for this font/size is 625 ie multiply any txtwidth() return value by 625 to get the right width in the report. If that is still too small you might need to increase it by say 10% or whatever it takes to tweak it right.

> this may be true, and I am probable finding the contanct wrong, because my new sizes are still too small.
>Here is what I do:
>
>lnlength = TXTWIDTH(lcExpr, lcFont, ;
>     lnFontsize, lcfontstyle)
>lnConstanct = WIDTH / lnlength
>
>
>after changing the label
>
>
>lnlength = TXTWIDTH(lcExpr, lcFont, ;
>   lnFontsize, lcFontstyle)
>REPLACE WIDTH WITH lnlength * lnConstanct
>
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform