Character Length to Pixels (OpenInsight 16-Bit Specific)
At 19 DEC 2003 05:14:19PM Fred Dietrich wrote:
Does anyone know of a way of converting the character length of text in a given font into pixels? For example, let's say you have an edit table with MS Sans Serif with a column that's 80 pixels wide and the user enters text that's too wide for the column, is there some way of (a) recognizing that the text is too wide and (b) expanding the column width so that the user can see the entire text?
At 19 DEC 2003 05:29PM Matt Sorrell wrote:
Fred,
I have a routine that I wrote in Visual Basic to handle this requirement for a grid that I am using. It should be portable fairly easily.
If you are interested, drop me an email.
At 19 DEC 2003 05:49PM Oystein Reigem wrote:
Fred,
Look up the TEXTRECT Utility.
- Oystein -
At 19 DEC 2003 05:54PM Donald Bakke wrote:
Fred,
You can use Utility("TEXTRECT") will help you with this.
At 05 MAY 2004 04:42PM Fred Dietrich wrote:
Oystein,
The TEXTRECT did what I wanted. Thanks! Now that you mention it, I remember seeing it in the list of Utility Services, but I think the name threw me off. I guess I was imagining some sort of graphical rectangle around text, as opposed to the dimensions of the text in pixels and just never bothered to read the description carefully.