Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculating length of printed string.
Message
From
16/01/2000 18:24:25
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00318779
Message ID:
00318788
Views:
30
>Let's say the font is Arial Normal 8 and FONTMETRIC(6), the average width, is 5 pixels. Leaving out TXTMETRIC() to make the example simple, let's say all of the characters in the string are "average".

I don't know the answer to what your asking, but I have a little trick to get the real length of a string in screen pixels. Add a label to a form, set its top to -100 and its Font and Size to whatever your measuring, and its caption to the string. Then Set its AutoSize to .T. and just read the length.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform