This content has been marked as final. Show 7 replies
Did you set variableRowHeight="true" on the List control?
Thanks, I will try that.
How could I achieve the same by using a Tree? The branch would be an element for which I need a custom Item renderer to combine several tags of the xml/array in an HBox. The same goes foer the leaves.
Did not work in TileList.
In List it worked more or less... there seems to be a maximum rowHeight of 250px, although in List.as there is no limit anywhere like that...
Do you have an idea?
It definitely won't work in TileList - that control enforces the size policy so all of the elements are the same.
I suggest you open a formal support incident for the 250px issue; I'm not aware of any limitation.
An alternative is to create your own list control - a somewhat advanced step, but that's what makes Flex a great UI - its adaptability.
As for the tree, like the list, there can only be 1 item renderer but it could have 2 states. One state could be for the branches (your title) and the children could be in the second state. But experiment a bit first.
I found out something: There is no "real" limitation. But if the content has not set any height it is set to something around 250px.
I also ussed your code for testing and simply increased the number of items in the list so that it can not fit in any more ( http://weblogs.macromedia.com/pent/archives/2006/04/a_list_itemrend.cfm). There I have the same behaviour.
But if I set the height of the List containing the car models manually, e.g. to 400 the main List row has the right size.
So all I need now is to know how I can set the height of the list containing yoru car models to the "perfect" height to match ALL the content. Then the main row should adapt correctly...
Again me... I played around a little bit.
If I use mx:List with variableRowHeight=true this works fine with small height between1 and ~250 without setting the height of the contentn fix.
If I set the height of the content of the row Fix (e.g. in the ItemRenderer) it works also with big heights 250<.
But It seem like the rows don't get the row height correctly when I use VBox in my Item renderer which has no fixed height for its content but is normally higher that 250...
Any suggestions? it does not seem to be a problem of my code as this also occurs with your car example if you increase the content to crate a long list of cars...
And more information: the information is definitly not my ItemRenderer. I tried it by simply putting them in a VBox with a repeater.
So it seems List & Datagrid have some Error with detecting how big its content really is when you are using dynamic repeaters in the custom content ItemRenderer.