Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to find with and hight for a field?
Message
De
12/11/1999 03:09:24
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
11/11/1999 08:28:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00285992
Message ID:
00290505
Vues:
23
>>>>>I know the fontname,fontsize,fonttip and the lenght of a field.
>>>>>Hod can i find the best with and height for this field?
>>>>>Thanks.
>>>>
>>>>
Hi Cemal,
>>>>For height you don't really need anything. Just set integralheight to .t. For width calculation is as follows :
>>>>
lnSizeInPixels = ;
>>>>  txtwidth(lcSampleText, lcFont, lnFontSize) ;
>>>>    * fontmetric(6, lcFont, lnFontSize)
lcSampleText is replicate("H",fsize("fieldname","table")).
>>>>Cetin
>>>
>>>Thanks Çetin.
>>>
>>>Türkçe yazacaðým.Umarým sorun çýkmaz.
>>>Ben bunu bir frx dosyasýndaki width'i deðiþtirmek için düþünmüþtüm.Ama sanýrým frx'in with formatý pixel deðil.Çünkü yazdýðýn formüle göre hesaplayýnca çok küçük bir deðer çýktý. Acaba frx'in width formatý nedir veya senin formülün frx'e uygun olanýný biliyormusun?
>>>Þimdiden teþekürler saygýlar.
>>>
>>>Excuse me Sirs.My english is very bad im writen turkish to Çetin.Thanks.
>>
>>
Merhaba Cemal,
>>Reporttaki width pixel degerinin horizontal aspectle carpimi. Ancak fox ortalama karakter genisligini kullanip sonra da biraz ekleme yapiyor. Onun tam formulunu bilmiyorum. Kabaca yukarýdaki sonucu fontmetric(19, lcFont, lnFontSize) ile carparsan genisligi elde ediyorsun. Formulde 6 yerine 7 kullanarak maximum karakter genisligine gore de hesaplayabilirsin.
>>Cetin
>
>Teþekkürler Çetin,
>Þimdi deneyemedim.Ama sonra deneyeceðim.Umarým iþe yarar.
>Bu arada frx'de width'i bulmam gerektiði gibi height'ýda bulmam lazým.
>Onunda bir formülü varmý?
>Teþekkürler.Saygýlar.Cemal


fontmetric(1, lcFont, lnFontSize) * fontmetric(20, lcFont, lnFontSize) yüksekligi veriyor. Ancak fox kendisi sonuca yaklasik 1/6'si kadar ekleme yapiyor. Yapmasan da normal yuksekligi elde ediyorsun.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform