Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
STR() not lining up.
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00057413
Message ID:
00057525
Views:
41
>>>>>I am DEFINEing a POPUP based on STR(Projnum,3)+" "+Projdesc. The Projnum's are not right-justified together making the list look sloppy.
>>>>>
>>>>>ie. 3 Desc1 should look like 3 Desc1
>>>>> 13 Desc2 13 Desc2
>>>>> 123 Desc3 123 Desc3
>>>>>
>>>>>How do I correct this?
>>>
>>>Excuse me for empty reply, first! You could use proportional font ("Courier New") to get things aligned.
>>
>>Thanks Ed. I forgot about the propotional/non-proportional issues. Is there a of determining what fonts are proportional and which ones aren't?
>
>IMHO, it's enough to remember that "Courier New" is proportional. I don't know about particular function/property, but you could use FONTMETRIC or TXTWIDTH to make some analysis here.

You can try this.
I assume that if a average width of a font == maximum width of the same font, this font should be proportionnal.
(Just a guess)
***
MAXWIDTH=7
AVERAGEWIDTH=6
=AFONT(laFont) &&Get an array of installed fonts
FOR i = 1 TO ALEN(laFont,1)
    IF FONTMETRIC(MAXWIDTH , laFont[i], 10) = FONTMETRIC(AVERAGEWIDTH , laFont[i], 10)
        WAIT WIND laFont[i]+' is (probably) proportionnal!'
    ENDIF
ENDFOR
***
:0)
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Previous
Reply
Map
View

Click here to load this message in the networking platform