我对Adobe Flex/Actionscript很新颖,正在尝试创建人员搜索应用程序。到目前为止,我有我的结果显示为水平列表,但我还想包括每名以上的图像作为我的精彩油漆技能显示:Adobe Flex中的图像
/* listOfPeople is a list of arrays with a["name"] a["sex"] a["dob"] and
a["image"] which is just a URI to the image */
<s:List width="100%" height="100%" id="results" dataProvider="{listOfPeople}" change="clickPerson(event)">
<s:itemRenderer>
<fx:Component>
<s:MobileIconItemRenderer
iconField="{data.image}"
iconHeight="100" iconWidth="100"
label="{data.name} - {data.sex}"
messageField="dob"/>
</fx:Component>
</s:itemRenderer>
<s:layout>
<s:HorizontalLayout paddingBottom="100" gap="6" paddingTop="100" paddingLeft="0"
paddingRight="0"
requestedColumnCount="-1"
variableColumnWidth="true"
verticalAlign="bottom"
/>
</s:layout>
</s:List>
任何想法?该iconField似乎并没有显示在所有使用...用正确的反斜杠
干杯 菲尔的完整路径,即使
编辑:
的图像显示PersonDetails画面精细,当人被点击:
<s:HGroup verticalAlign="middle" gap="12" paddingTop="10" paddingLeft="10">
<s:Image source="{data.image}" height="170" width="170"/>
<s:VGroup>
<s:Label text="{data.name}"/>
<s:Label text="{data.dOB}"/>
<s:Label text="{data.sex}"/>
<s:Label text="{data.birthplace}"/>
<s:Label text="{data.colour} {data.ethnicity}"/>
<s:Label text="{data.height}"/>
</s:VGroup>
</s:HGroup>
data.image的价值是什么? – 2011-03-31 11:35:36
它只是一个uri,例如: C:\ Users \ pmcparlane \ Adobe Flash Builder Burrito Preview \ PersonSearch \ images \ default.jpg – 2011-03-31 11:36:56
如果您使用垂直布局,您会看到它吗? – 2011-03-31 12:02:17