简体   繁体   English

在Flex 4的按钮中添加状态

[英]Adding states in a button in flex 4

I would like to know if there is a way to add states to a button in flex 4 in addition to the default states that are present. 我想知道除了存在默认状态外,是否还有一种方法可以将状态添加到flex 4中的按钮。 I am unable to find any material on this. 我找不到与此有关的任何材料。 Kindly guide me to an appropriate resource. 请引导我获得适当的资源。

You can add something like: [SkinState("myNewState")]; 您可以添加如下内容: [SkinState("myNewState")]; to a component which extends from Spark Button. 到从Spark Button扩展的组件。

You can also make your own ButtonSkin add states there as well: <s:states> <s:State name="normal"/> <s:State name="disabled"/> </s:states> 您也可以在其中创建自己的ButtonSkin添加状态: <s:states> <s:State name="normal"/> <s:State name="disabled"/> </s:states>

I've used it to extend a TextInput but I assume it's the same for a Button :) 我用它扩展了TextInput,但我认为它与Button相同:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM