我正在使用自定义的itemrenderer来显示照片列表,并且需要知道如何控制宽度。目前,它这样做:在Flex中限制自定义列表itemrenderer的宽度
Why so wide? http://tdwright.co.uk/phpplayground/test_tom/img/flex_problem1.png
其中,因为我相信你会同意,是眼睛bleedingly难看。
列表创建这样的:
<mx:Panel width="100%" height="100%" layout="absolute" title="Photos">
<mx:List x="0" y="0" width="100%" height="100%" id="photoList" dataProvider="{photos}" itemRenderer="thumbnails" rowHeight="100"/>
</mx:Panel>
,将itemRenderer组件看起来是这样的:
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Image source="{data.src}" id="image" scaleContent="true" toolTip="{data.caption}" height="100%" horizontalAlign="center"/>
</mx:VBox>
我试着将宽度= “100%”,在一大堆的地方,但没有成功。如果有人知道我可以如何控制这一点,我会非常感激。
这个问题有超过2k的意见,是超过2岁,但仍然没有答案。它变得无关紧要了吗? (我放弃使用Flex。)我应该给它一个赏金吗? – 2011-10-03 12:28:15