我需要向按钮标签添加下标或上标和普通文本。但据我了解按钮的label属性是简单标签,如果是RichText那就很容易了。
我需要下标/上标+普通文本。另外,我不能在皮肤类中使用 2 个标签,我在皮肤类中只能有 1 个标签或 1 个 RichText,因为据我了解 labelDisplay 仅适用于皮肤类中的一个标签。另外我的按钮不是恒定的。
那么大家对如何完成按钮有什么想法吗?
I need to add subscript or superscript and normal text to buttons label. But as far as I understand button's label property is simple label, if it was RichText it would be easy.
I need subscript/superscript + normal text. Also I can't use 2 labels in skin class, I can only have 1 label or 1 RichText in skin class because as far as I understand labelDisplay works only for one label in skin class. Plus my button isn't constant.
So guys any ideas on how to get that done for button?
发布评论
评论(1)
这是我找到的解决方案:
使用 htmltext 将文本设置为下标或上标,如下所示:
这是文本字段的旧解决方案。
mx:Label
支持htmltext,它可能会工作。我认为。Here is the solution I found:
Use htmltext to set text to subscript or superscript like below:
This is old solution for text fields.
mx:Label
supports htmltext, it may work. I think.