Home » Developer & Programmer » Forms » Measure length of string in Inches
Measure length of string in Inches [message #283663] Tue, 27 November 2007 21:42 Go to next message
Messages: 35
Registered: August 2006
Hi All,

Is it possible to measure the length of a string in inches or centimeters.

my requirement is to modify the width of a text box in form based on the string size, so i want to measure the length of string in inches or centimeters or ....

Could any one help me with this.

Re: Measure length of string in Inches [message #283665 is a reply to message #283663] Tue, 27 November 2007 22:04 Go to previous messageGo to next message
Messages: 25524
Registered: January 2009
Location: SoCal
Senior Member
It is easier to calculate the length when a fixed sized font is involved as opposed to a proportional font.
Re: Measure length of string in Inches [message #283727 is a reply to message #283665] Wed, 28 November 2007 01:01 Go to previous message
Messages: 21127
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Not to mention different font size; string written with Arial size 8 is not as long as the one written with Arial size 12. Also, screen resolution plays a role here as well; the same string, written with the same font (and same size) will look differently on 800x600 and 1280x1024.

So, what is, exactly, length in inches? If you can establish the environment (non-proportional font (Courier, for example), fixed font size (10, for example), screen resolution (1024x768, for example)), then you *might* be able to calculate string's length.

I have never tried to do that, but - sounds interesting.
Previous Topic: Re: Free Book on Developer 2000
Next Topic: Run a procedure in a form
Goto Forum:

Current Time: Fri Jul 21 05:44:48 CDT 2017

Total time taken to generate the page: 0.07365 seconds