【发布时间】:2019-03-31 19:00:13
【问题描述】:
我正在使用自定义 itemrenderer 来显示照片列表,并且需要知道如何控制宽度。目前它这样做:
(来源:tdwright.co.uk)
我相信你会同意,这丑得让人眼花缭乱。
列表是这样创建的:
<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>
我尝试将 width="100%" 放在一大堆地方,但没有成功。如果有人知道我如何控制这一点,我将不胜感激。
【问题讨论】:
-
这个问题有超过 2k 的浏览量并且已经超过 2 年了,但仍然没有答案。它变得无关紧要了吗? (我放弃了使用 Flex。)我应该提供赏金吗?
标签: apache-flex list width itemrenderer