Trying to add a skinClass to <mx:Form>

不羁的心 提交于 2019-12-13 06:47:26

问题


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


回答1:


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




回答2:


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.



来源:https://stackoverflow.com/questions/2513344/trying-to-add-a-skinclass-to-mxform

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!