2 Replies Latest reply on Dec 25, 2007 2:49 PM by Rachid_Heffels

    TileList not aligning properly

    Rachid_Heffels
      Hi there,

      I'm still learning Flex and noticed that my TileList/Vbox isn't aligning as I expected.
      I was hoping with setting everything to 100% width that no scrollbar would appear, but this isn't the case as you can see in this screenshot

      Do you know what I need to do to get pretty tiles with the width and height of the images + text, without setting pixel values ?

      test23.mxml
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" creationComplete="randomCars.send()" borderStyle="solid">
      <mx:HTTPService id="randomCars" url="h_ttp://localhost/xml.php"/>
      <!-- changed http to h_ttp because forum can't handle the full line, weird--->
      <mx:Panel id="p" width="100%" height="100%" layout="horizontal" title="Random selection">
      <mx:TileList id="tl" dataProvider="{randomCars.lastResult.cars.item}" width="100%" height="100%" itemRenderer="CarsRenderer">
      </mx:TileList>
      </mx:Panel>
      </mx:Application>
      CarsRenderer.mxml
      <?xml version="1.0" encoding="utf-8"?>
      <mx:VBox xmlns:mx=" http://www.adobe.com/2006/mxml" horizontalAlign="center" buttonMode="true" width="100%" height="100%">
      <mx:Image source="{data.image}"/>
      <mx:Label text="{data.brandname} {data.model} ({data.year})" width="100%"/>
      </mx:VBox>