简体   繁体   中英

Flex 4 skins — when to include Actionscript Styling Code?

When using Flash Builder to create a new component Skin based on an existing Skin, one has the option to include Actionscript styling code or not. Wouldn't this code always be necessary?

Here is an example of two people, both of whom have skinned the spark Panel.

With styling code:

http://blog.flexexamples.com/2009/10/19/repositioning-the-control-bar-on-a-spark-panel-container-in-flex-4/

Without styling code:

http://www.popamihai.com/2010/11/flex/skinning-flex-4-components-skinning-the-spark-panel-component/

But they both seem to run fine. How can this be?

The styling code still gets applied due to the fact that you're extending a class.

You should add the styling code when you intend to change it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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