Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Programmatically
Message
 
 
To
21/11/1999 00:03:01
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00293493
Message ID:
00293701
Views:
18
Mike,

To make your function more universal replace the 7 with fontmetric() getting the average character width if your field is mixed case or getting maxwidth if the field is uppercase.

>Hi Alan,
>
>>What is the formula to calculate the proper width of each column?
>
>Here's what I use:
>
>size = iif(FieldSize < 3, 20, FieldSize * 7 + 4)
>
>I use AFields, so the third element is what I use for FieldSize, but you may want:
>
>size = iif(fsize(field(lnI)) < 3, 20, fsize(field(lnI)) * 7 + 4)
>
>This Help?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform