Measure length of string in Inches [message #283663] |
Tue, 27 November 2007 21:42 |
shivaram9
Messages: 35 Registered: August 2006
|
Member |
|
|
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.
Thanks,
Shiva
|
|
|
|
Re: Measure length of string in Inches [message #283727 is a reply to message #283665] |
Wed, 28 November 2007 01:01 |
|
Littlefoot
Messages: 21818 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.
|
|
|