Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
List Box and Non-Proportional fonts
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
List Box and Non-Proportional fonts
Environment versions
Visual FoxPro:
VFP 6 SP5
Miscellaneous
Thread ID:
00967462
Message ID:
00967462
Views:
79
Hi all

This list box in my mover I have populated and is working well except for calculating field
width. I have tried to use FONTMETRIC(6, ...) as FONTMETRIC(7, ...) returns too large a number
that I cannot fit all the columns. I tried to use Courier New as a proportionate font, then I
end up with less columns though much better than FONTMETRIC(7, ...). I have shortage of screen
real estate as I am supposed to target 800x600 monitors.

Can I have an intermediate size calculation? I have tried to up the calculation by 1.15 so
that some more space is available than then average. The calculation goes something like this
ALLTRIM(STR(FONTMETRIC(6, ;
			THIS.Icntmover1.lstAvailable.FontName, ;
			THIS.Icntmover1.lstAvailable.FontSize) * LEN(&lcTemp.) * 1.15))
This above I am then using to create the column width string to be poulated in the ListBox.

Plus using non-proportionate fonts renders the numeric values to display towards the left and
uneven depending on the size of the value as the numerals are padded with spaces on the left.
Also in date column final 2 digits of the year are chopped off due to Average Font Calculation
in FONTMETRIC().

Please advise.
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Next
Reply
Map
View

Click here to load this message in the networking platform