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

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

问题描述

我需要通过扩展火花列表类在 Flex 4.5 中创建一个自定义组件.基本上,我想添加一个名为title"的 UIComponent 类型的新变量.设置此变量后,我需要将其呈现在列表顶部.

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.

这将为我提供一个列表,其中包含一个可随列表滚动的可配置标题组件.应该很简单,但我无法弄清楚它是如何完成的.我一直向上查看 spark.components.Listspark.skins.mobile.ListSkin 的层次结构,并阅读了一些关于蒙皮的文章,但所有教程都是极其简化,不展示如何做这样的事情.

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.

有什么帮助吗?谢谢

推荐答案

我会研究以下 flex POC:iOS 主题.列表中有多个部分,但您可以下载页面上的示例项目.该组件称为 ListForm,并且有一个外观、一个 ActionScript 组件和一个 Item Renderer.IR 不太重要,您可以创建自己的符合您需要的文件,但 ListForm.as 文件和相应的皮肤几乎可以满足我的需要.

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天全站免登陆