开发者

Trying to add a skinClass to <mx:Form>

开发者 https://www.devze.com 2022-12-25 01:56 出处:网络
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=\"\"

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)?


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消