Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting button fontbold property in grid
Message
From
01/04/2005 08:28:16
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
31/03/2005 17:45:03
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01000307
Message ID:
01000602
Views:
25
>Hi Cetin,
>
>> textbox that uses displaypath(memofield,nchars), mline(memolfield,1) ...)
>
>I've thought about using displaypath() like you've suggested, but how does one use this function when dealing with a proportional font? In other words, how will displaypath() know where to add the "..." ellipsis if you're using a very small or very large font?
>
>I did some research and it appears that the Windows API DrawText() and CreateFont() functions can be used to create "ellipsis-ized" strings appropriate for a specific font and display width. Have you used these functions or can their functionality be implemented using VFP functions?
>
>Regards,
>
>Malcolm

Malcolm,
Yes I used them but couldn't assign results to a specific object (directly writing on form is OK).
However you don't need them. You can calculate how many would fit using regular VFP functions (fontmetric,sysmetric,txtwidth) and set your controlsource to be your calculatorUDF(). In FoxyClasses I even didn't bother to use ellipsis, just show how much fits (one line editbox control).
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform