本文介绍了字符串长度(英寸)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

   我必须将各种长度的字符串放入固定宽度的文本框中。我打算通过更改字体大小来做到这一点,但我想要尽可能的最大尺寸。 字符长度因字符而异(Courier太宽了
)。 有没有办法以英寸或任何度量单位来衡量字符串的长度,无论字体是什么?

解决方案

   I have to fit strings of various lengths into a fixed width text box. I intend to do this by changing the font size, but I want the maximum size possible.  Length in characters varies depending on the characters (Courier is way too wide to use).  Is there a way to measure the length of a string in inches, or any unit of measure, regardless of the font?

解决方案


这篇关于字符串长度(英寸)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 10:15
查看更多