At 4:40 PM -0600 2/18/02, Scott Crick (Lists) wrote:
truncWhere = TruncString(width, m, truncWhere)
The problem with this is, it appears to assume that the text is formatted as
Geneva, 10 pt. I need this to be able to work at any given font and size.
Anyone have any ideas?
It assumes the the text is formatted as whatever the current font and
size are. The trouble is that in RB, you don't have control over the
"current" font and size -- that's something you're shielded from.
However, you can probably force the issue in an unthreaded app by
drawing a string to some graphics object in the desired font and
size, and then immediately calling TruncString.
HTH,
- Joe
--
,------------------------------------------------------------------.
| Joseph J. Strout REAL Software, Inc. |
| joe at realsoftware dot com http://www.realsoftware.com |
`------------------------------------------------------------------'
|