标在TextField中 [英] Superscript in TextField

查看:134
本文介绍了标在TextField中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目,我需要显示一个货币ammount的一个文本字段

I have a project where I need to show a TextField with a monetary ammount

var tf:TextField = new TextField()
tf.htmlText = "<font size=\"30\">1</font>99";

这将显示99美分,为下标。我该如何证明这是标?

This will show the 99 cents as subscript. How do I show this as superscript?

重要的是,我这显示在同一个文本框,所以我没有,没有美分担心2,3或4位数的美元价值或价值。该调整将是一个大量的工作。

It's important that I display this in the same textfield so I don't have to worry about 2,3, or 4 digit dollar values or values with no cents. The alignment will be a lot of work.

我GOOGLE了GG标字体,但因为这是处理本地化,我需要使用设备字体,而腋臭嵌入。同样尺寸为优先级,以便嵌入字体的东西,是不是一个真正的选择。

I googled the GG Superscript fonts but because this is dealing with localization, I need to use device fonts rather thatn embedded. Also size is priority so embedding fonts is something that is not really an option.

推荐答案

您可以使用请将TLFTextField一个从文本布局框架的。

you can use a TLFTextField from the Text Layout Framework.

这是从上个例子,在这个网址:

This is from the last example at this URL:

<一个href="http://flashthusiast.com/2010/05/05/getting-started-with-the-tlftextfield-class-in-actionscript-3-0-and-flash-cs5/">http://flashthusiast.com/2010/05/05/getting-started-with-the-tlftextfield-class-in-actionscript-3-0-and-flash-cs5/

<span baselineShift='superscript'>over</span>

检查<一href="http://cookbooks.adobe.com/post_Superscript___Subscript_with_Text_Layout_Framework-18175.html">this 之一了。

这篇关于标在TextField中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆