flex 3 手风琴组件和圆角
我在 Flex 中使用手风琴组件,但似乎无法让标题具有圆角。 页脚呈圆形没有问题,但页眉仍然是方形的,有什么建议吗?
Im using the accordion component in Flex and cant seem to get the header to have rounded corners. The footer rounds no problem but the header remnains square, any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是来自的深入示例Doug McCune 展示了如何自定义 Accordion 控件,并附有源代码和解释,其中他做了类似的事情。 虽然具体细节取决于您想要执行的操作,但本质上您需要重新设计手风琴项目标题的按钮和/或选择外观。
剥皮可能有点棘手,其中一件看起来应该比实际更容易的事情之一(我个人发现使用 Flash 进行剥皮对于除了最简单的情况之外的所有人来说都是一种痛苦;我更喜欢用代码来完成或标记),但如果您花一点时间研究示例中的代码,我相信您会看到发生了什么并能够应用于您的项目。 希望它有帮助——祝你好运!
Here's an in-depth example from Doug McCune showing how to customize the Accordion control, with accompanying source code and explanation, in which he does something similar. While the specifics will depend on what you're trying to do, essentially you need to re-skin the button and/or selection skins of the accordion-item header.
Skinning can be a bit tricky, one of those things that seems like it ought to be easier than it is (and personally I find using Flash for skinning to be a pain for all but the simplest situations; I much prefer to do it in code or markup), but if you spend a little time with the code in the example I'm sure you'll see what's going on and be able to apply to your project. Hope it helps -- good luck!
最好的选择是在 Flash 中设计皮肤并在 Flex 中使用该皮肤。
我建议从这里下载 Flex 皮肤模板
http://www.adobe.com/cfusion/entitlement/index.cfm?event=custom&sku=RC00530&e=flex_skins
安装它。
当 Flash 打开时,转到“从模板创建”并单击“更多”。 选择柔性皮肤。 您可以选择仅创建手风琴模板或完整皮肤模板。 根据您的需要设计它。 运行它来创建一个 SWC,然后将该 SWC 导入到 Flex 中。 然后您可以在手风琴面板中使用该皮肤。
这样你的皮肤就可以设计成圆角(确保你启用了比例 9,以便它们正确缩放)
Your best bet is to probably design the skin in flash and use that skin in flex.
I suggest downloading the flex skinning templates from here
http://www.adobe.com/cfusion/entitlement/index.cfm?event=custom&sku=RC00530&e=flex_skins
installing it.
When flash opens goto 'create from template' and click on more. Select flex skins. You can choose just to create an accordion template or a full skins template. Design it as you want. Run it to create a swc and then import that swc into flex. You can then use that skin in your accordion panel.
That way your skin can be designed with your rounded corners (make sure you have scale 9 enabled so that they scale properly)