>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