Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Character field width
Message
De
13/10/2013 15:35:49
 
 
À
13/10/2013 13:03:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01585392
Message ID:
01585402
Vues:
55
gDipMeasureSting is certainly preferable to txtwidth, but, in my experience, it is not as precise as advertised.
In my routines that use it, I've included a fudge-factor multiplier to adjust as necessary for my actual output.
IIRC, I've had to fudge by as much as 7% in some cases.

Also, I should add that one place I use it is in conjunction with the old GenRepoX trick of preprocessing
the FRX. So, for example, MAX(gdipmeasurestring) can be used to set the width of a report
object before proceeding with actual output -- with the obvious trade-off of the
preprocessing time involved.

-m.

****************

>http://doughennig.blogspot.no/2006/04/forget-txtwidth-use-gdipmeasurestring.html
>
>>Hi All:
>>
>>I have a character field on my report that could potentially be as wide as 20 characters. In 90% of the cases, however, the field is less than 12 characters. Since I want the field to display as large as possible, I want to place two fields on the report with code in the 'print when', so that if it is less than 12 characters, use the larger font.
>>
>>However, since I'm dealing with the Arial font, I can't say len>12, since a 'W' is wider than an 'i'. What is the code I would use?
>>
>>Thanks,
>>
>>Yossi
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform