3 Replies Latest reply on Dec 13, 2010 1:17 PM by outsider44

    Problem adding a border to an image with a variable size



      I recently started to develop a photo gallery on Flex 4 and I am facing a simple problem I cannot resolve...


      In a <s:List> I display my photo thumbnails with a TileLayout whose RowHeight and ColumnWidth are variable, the size of the thumbnails are controlled by a HSlider making them bigger or smaller.


      My problem is when I try to add a border to the mx:image that I am using in a custom ItemRenderer.

      I use a borderContainer and I cannot manage to make it fit automatically the size of my Image...


      <s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                      width="100%" height="100%" >


           <s:BorderContainer id="bc" borderVisible="true"  borderColor="#3c3a3a" borderWeight="1" minWidth="60" minHeight="60">

                      <mx:Image id="tmb" width="100%" height="100%" verticalAlign="middle" horizontalAlign="center" maintainAspectRatio="true" smoothBitmapContent="true" />





      Maybe there is a property which I don't know...

      Thanks for your help