开发者

Flex: Creating a custom list component

开发者 https://www.devze.com 2023-02-03 03:39 出处:网络
I\'m trying to extend the mx:Box container so that two buttons sit on the outside of the container to cycle through it\'s contents (similar to a scrollbar).

I'm trying to extend the mx:Box container so that two buttons sit on the outside of the container to cycle through it's contents (similar to a scrollbar).

I've made a custom component that looks basically like "mx:HBox->mx:Button mx:Box mx:Button" where the buttons and box are children of the hbox.

How do 开发者_如何学CI offer the user access to the box (say its dataProvider and itemRenderer) through my custom component?

So they just need to write 'local:MyCustomComponent dataProvider="rar" itemRenderer="rar"/>' and my box inside that component can use it?


Create getter and setters that proxy the properties of your List component.

i.e:

private function set dataProvider(value:Object):void
{
 list.dataProvider = value;
}
0

精彩评论

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

关注公众号