开发者

How can i create a Flex list component with the 0 rowIndex starting at the bottom instate of the top

开发者 https://www.devze.com 2023-01-23 23:28 出处:网络
Does anybody know how i can create a stacking list component(just like photoshop) where the first row start开发者_JAVA技巧s at the bottom and the second on above the bottom and so on.

Does anybody know how i can create a stacking list component (just like photoshop) where the first row start开发者_JAVA技巧s at the bottom and the second on above the bottom and so on. Normally the list component works like this.

0

1

2

3

what i need is a list component that works like this

3

2

1

0

To illustrated my question i have uploaded a picture of the component i need to build. The rowindex of the inverted list component must start at the bottom. meaning that the lowest row in the list is always zero.

How can i create a Flex list component with the 0 rowIndex starting at the bottom instate of the top

Does anybody know how i can accomplish this?

Thanks

DJ


one way of doing this is to always add the row in the container using this.addChildAt(0); by doing this every new row will be added to zero index and its order will be reverted from default order


Define a new layout to do this. This answer has some starting links.

Make sure you get the virtual layout working as well for the list control (I suggest just grabbing the VerticalLayout and changing the updateDisplayListReal.


obviously you are storing the layers information in array or something like this. just revers the the array before assigning it to list control.

that is

var a:Array = ["1","2","3"];
a.reverse();

now it will look like

// 3 2 1 when assigned to list control as data provider.
0

精彩评论

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

关注公众号