Skip to main content
Participant
February 15, 2009
Question

Problem setting different width for images using HorizontalList tag

  • February 15, 2009
  • 2 replies
  • 681 views
Hi,<br />I succeeded using HorizontalList in my AdvancedDataGrid,<br /><br /> <mx:groupedColumns><br />...<br />...<br /> </mx:groupedColumns> <br /> <mx:rendererProviders> <br /> <mx:AdvancedDataGridRendererProvider <br /> dataField="Actual" <br /> renderer="ChartRenderer" <br /> columnIndex="3" <br /> /> <br /> </mx:rendererProviders> <br /><br />My Chartrenderer:<br /><br /><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" <br /> xmlns:local="*"><br /> <mx:Script><br /> <br /> import mx.collections.ArrayCollection;<br /> import mx.controls.Image;<br /> private var images:Array; <br /> private var catalog:ArrayCollection; <br /> private static var cat:Array = [<br /> "kpi_overtime_bar_10.png", "kpi_overtime_bar_20.png",<br /> "kpi_overtime_bar_30.png", "kpi_overtime_bar_40.png"<br /> ];<br /> <br /> <br /> private function initCatalog(items:Array):void<br /> {<br /> catalog = new ArrayCollection(items);<br /> myList.dataProvider = catalog;<br /> }<br /> <br /> <br /> </mx:Script><br /> <mx:VBox height="20" width="40%" xmlns:mx="http://www.adobe.com/2006/mxml"<br /> horizontalScrollPolicy="off" <br /> verticalScrollPolicy="off"><br /> <mx:HorizontalList width="100%" id="myList" <br /> horizontalScrollPolicy="off"<br /> verticalScrollPolicy="off"<br /> columnCount="4" <br /> creationComplete="initCatalog(cat)"><br /> <mx:itemRenderer><br /> <mx:Component><br /> <mx:Image width="50%" height="20"<br /> maintainAspectRatio="false"/> <br /> </mx:Component><br /> </mx:itemRenderer><br /> </mx:HorizontalList><br /> </mx:VBox><br /><br /></mx:Application><br /><br />This is a test I've done to see if I can palce a list of images in a cell,<br />and I can :)<br /><br />I have 2 problems:<br /><br />1. Here the size of each image is contant, I need a way to set each image in the list to be different,<br />Can I do it? <br />2. I need to load the images dynamically and not from a fixed Array,<br />Can I do it?<br /><br />It will be great to get help.....<br />Thanks<br />Jo
This topic has been closed for replies.

2 replies

Inspiring
February 27, 2009
On Sunday 15 Feb 2009, Yossi Bar wrote:

> I think not all my descussion detailes were shown,



I think you should be asking on FlexCoders...



--

Tom Chiverton

Helping to collaboratively enable 24/7 plug-and-play portals



****************************************************



This email is sent for and on behalf of Halliwells LLP.



Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word partner to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority.



CONFIDENTIALITY



This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500.



For more information about Halliwells LLP visit www.halliwells.com.




Participant
February 15, 2009
Hi guys,
I think not all my descussion detailes were shown,
So to summerise it, I cant see a way to use HorizontalList that shows images BUT with different width :((
How can I display a list of images (horizontally) with different width for each one?

Thanks