2
我想從xml文件填充horizontalList組件,寬度值將在xml文件中以及所有數據。Horizontallist可變寬度
其實我有這樣的代碼:
<mx:Model id="epg" source="epg.xml" />
<mx:Component id="customRend">
<mx:Label text="{data.description}" width="{data.width}"/>
</mx:Component>
<mx:HBox x="82" y="104" width="1203" height="113" verticalAlign="middle">
<mx:HorizontalList width="100%" dataProvider="{epg.channel.program}"
itemRenderer="{customRend}" horizontalScrollPolicy="off">
</mx:HorizontalList>
</mx:HBox>
但它設置相同的寬度爲列表中的所有元素。
你知道如何做到這一點嗎?
非常感謝。 溴
感謝您的幫助。 我試過這段代碼,但仍然是同樣的問題。所有元素的寬度總是相同的,我對此沒有任何暗示:-( – 2010-02-25 11:56:15
你使用的是什麼版本的Flex?它對我有用 – 2010-02-25 21:53:33
我有Flex Builder 3, 我真正想要實現的是像這個http://jaganath.files.wordpress.com/2006/12/guide.PNG,也許有其他更容易的組件,我可以使用... – 2010-02-26 05:59:21