0
我有一個簡單的應用程序,它由一個HSlider和一個列表組成,其中包含一個項目渲染器和一個由佈局管理的邊界容器。出於某種原因,當移動滑塊以減小項目渲染器的大小時,它只會減小到一定的大小,並且不會進一步減小。我在flex 3中使用相同的原理(使用mx組件,它工作正常)。任何想法我在這裏做錯了嗎?Flex 4的HSlider和TileLayout調整大小問題
這是應用程序MXML:
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:HSlider id="thumbSize" layoutDirection="ltr" snapInterval=".25" showDataTip="true" minimum=".8" maximum="2" value="2" liveDragging="true"/>
<s:List id="photosList"
itemRenderer="ImageRender"
horizontalCenter="0" verticalCenter="14" width="100%" height="90%" borderAlpha="0" selectionColor="white" allowMultipleSelection="true" rollOverColor="white">
<s:layout>
<s:TileLayout columnWidth="{80*thumbSize.value}" rowHeight="{79.5*thumbSize.value}" horizontalGap="0" useVirtualLayout="true"/>
</s:layout>
<s:dataProvider>
<s:ArrayList>
<fx:Object/>
<fx:Object/>
<fx:Object/>
<fx:Object/>
</s:ArrayList>
</s:dataProvider>
</s:List>
</s:Application>
項呈示:
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:BorderContainer cornerRadius="19" top="0" bottom="0" left="0" right="0" borderAlpha="1" borderWeight="3" borderColor="0xc0c0c0" backgroundColor="0xD3D3D3" >
<mx:Image id="img" top="5" bottom="20" right="5" left="5" horizontalAlign="center" verticalAlign="middle" source="http://xmxsolutions.com/images/flex_logo.jpg" maintainAspectRatio="true"/>
</s:BorderContainer>
</s:ItemRenderer>
這應該與任何Flex 4的應用程序。
感謝您的任何指針任何人都可以根據文檔給我
Awsome ... minHeight and minWidth working a treat .. thx – charleetm 2010-09-14 08:09:37