Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a Font Metric equivalent to Length

Status
Not open for further replies.

SBendBuckeye

Programmer
May 22, 2002
2,166
US
Hello All,

I need to determine the maximum length for a long name field based on current data. Is there a Font Metric equivalent to Length? With proportional fonts, a name with several punctuation characters will show longer even though it does not display that way.

Here is the formula field I am currently using in test mode:

WhilePrintingRecords;
Global StringVar MaxString;
If Length(Trim({LeaseCustomer.CustName})) > Length(MaxString) Then
MaxString := Trim({LeaseCustomer.CustName});
MaxString;

Any ideas or suggestions as to how to incorporate Font Metrics into the process would be appreciated!


Have a great day!

j2consulting@yahoo.com
 
If you want to control the length of a field in inches or in comparison to other lines, I think the easier and maybe more usual method would be to convert to a non-proportional font, e.g., Courier.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top