在Flex 4.5中扩展一个火花列表 [英] Extending a spark list in Flex 4.5

查看:167
本文介绍了在Flex 4.5中扩展一个火花列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要通过扩展Sp​​ark List类来在Flex 4.5中创建一个自定义组件。基本上,我想添加一个名为title类型为UIComponent的新变量。当这个变量被设置的时候,我需要把它显示在列表的顶部。

这会给我一个列表,里面有一个可滚动列表的可配置标题组件。应该很简单,但我不知道它是如何完成的。我查看了 spark.components.List spark.skins.mobile.ListSkin 的层次结构,阅读了一些关于蒙皮的文章,但所有的教程都是非常简单,不显示如何做这样的事情。



有什么帮助吗?谢谢

解决方案

我会研究以下flex POC: iOS Theme 。列表中有多个部分,但您可以下载示例项目在页面上。该组件称为ListForm,并且有一个皮肤,一个ActionScript组件和一个Item Renderer。 IR不那么重要,你可以创建你自己的,你需要的,但是ListForm.as文件和相应的皮肤几乎可以收集你需要的东西。


I need to create a custom component in Flex 4.5 by extending the spark list class. Basically, I want to add a new variable named "title" of type UIComponent. When this variable is set, I need to render it at the top of the list.

This would give me a list with a configurable title component that scrolls with the list. Should be simple but I can't figure out how it's done. I've looked all the way up the hierarchy of spark.components.List and spark.skins.mobile.ListSkin and read a few articles about skinning but all the tutorials are extremely simplified and don't show how to do something like this.

Any help? Thanks

解决方案

I would look into the following flex POC: iOS Theme. There are multiple parts to the list, but you can download the example projects are on the page. The component is called the ListForm and there is a skin, an ActionScript component, and an Item Renderer. The IR is less important and you can create your own which matches what you need, but the ListForm.as file and the corresponding skin do pretty much what I gather you need.

这篇关于在Flex 4.5中扩展一个火花列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆