Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting button fontbold property in grid
Message
From
01/04/2005 09:54:25
 
 
To
01/04/2005 08:28:16
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01000307
Message ID:
01000645
Views:
26
Hi Cetin,

>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).

Thanks for the reply. In my case, I was looking for an efficient technique to emulate VFP 9's ability to "ellipsize" truncated content in listbox and grid columns. I can't use an editbox because I'm using single line textbox/labels and my customer wants to know if there is extra content not being displayed.

Did you try using DrawText() with the DT_MODIFYSTRING parm? In theory, this should add ellipsis to your string so that you can in turn display it as you want. I've built my own function to add ellipsis using a form's TextWidth method - it works but it doesn't seem too efficient and thus I was hoping there might be some better solutions already.

Malcolm
Malcolm Greene
Brooks-Durham
mgreene@bdurham.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform