Multilined itemRenderer for a spark.components.List - with test case and screenshot

假如想象 提交于 2019-12-01 11:36:08

You can use VerticalLayout's variableRowHeight property for that. Something like this:

<s:List id="myList" width="60" dataProvider="{MONTHS}" itemRenderer="MyRenderer">
    <s:layout>
        <s:VerticalLayout variableRowHeight="true" 
                          horizontalAlign="justify" 
                          requestedMinRowCount="5"/>
    </s:layout>
</s:List>

Furthermore, the Label in your ItemRenderer can take up all the horizontal space it wants. You should constrain its width. For example:

<s:Label width="100%"/>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!