Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Width size calc
Message
 
To
06/08/1999 12:30:36
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00250737
Message ID:
00250751
Views:
12
>Is there a calculation on determining the width of a data entry field?
>I have looked at the way vfp sizes fields when they are drop on the
>form, but I am not sure how vfp calculates the width. I am working
>in pixels. Thankyou

Calculating the width in a windows situation is not trivial. It is dependent on the font, the point size, the bold or regular, the italic or not, etc..

Using Courier New 9 pitn regular non italic you can use this formula;

(NumChars*7)+10 for textboxes
(NumChars*7)+25 for comboboxes

Change the font or point size and that formula does not work anymore.
Previous
Reply
Map
View

Click here to load this message in the networking platform