You can use a DataGroup with a TileLayout. In your tilelayout declaration you can set the rowCount property to what
ever you want.
Thanks for the idea but it didn't work. rowCount property is ready-only so i used requestedrowcount property, but it tries to tile the elements and kinda messes up everything, I want to limit them with a specific number.
I came up with putting the DataGroup into a Scroller and setting the horizontalScrollPolicy and verticalScrollPolicy to off. It works but there should be a better solution.
I would just create a simiple IList class that does what you want. You might even be able to get away with something as simple as extending ArrayList so that the length property returns a maximum of 5.
Hi Ryan, thanks for the idea but length propery is read-only as well, i can't set it to a specific number.
I think Ryan means creating a subclass of ArrayList and overriding the length property to return a smaller value that you provide.