Trying to add a skinClass to

2019-09-09 20:47发布

I'm working with Flex4 and I'm trying to skin a form (add a background and a border to it, etc.)

I'm trying to do it the Flex 4 way with skinClass=""

<mx:Form skinClass="skins.MyFormSkin" />

but it's not accepting skinClass as a property.

How should I do it such that I'm still adhering to the best practices in Flex 4 (decoupling visuals from logic)?

2条回答
我想做一个坏孩纸
2楼-- · 2019-09-09 21:34

To elaborate on Qz's response: mx:Form is not a Flex 4 spark component. It's still an old-style Flex 3 component and does not support skinning. The upcoming Hero release of the Flex SDK provides a new Flex 4 style Form (see http://blog.flexexamples.com/2010/08/28/creating-a-simple-spark-form-in-flex-hero/)

However, that's still pre-release code at this point. Depending on your project, Hero may or may not be appropriate.

查看更多
放荡不羁爱自由
3楼-- · 2019-09-09 21:39

skinClass only works on spark components, which have tags starting with <s:

查看更多
登录 后发表回答