1 Reply Latest reply on Aug 16, 2011 7:09 AM by saisri2k2

    How to set the background image for each row in a list using flex?

    Chellaa2011 Level 1

      Hi,

        I have a list in my Adobe Flash Builder 4.5 and Flex 4.5 mobile app. I show the image and the label in the list. I would like to set an image as the background for each row. I have only one background image. The same image needs to be shown in any of the row in the list.

       

      I noticed that the list has the alternatebackcolor property. But I don't find the background image property for list row.

       

      Can anyone help me in this?

        • 1. Re: How to set the background image for each row in a list using flex?
          saisri2k2 Level 4

          Here is how I would implement

           

          1. Create renderer
          2. Add SkinnableContainer element and create a skin for this container namely SkinnableContainerSkin
          3. find the fill section in the skin
          4. add bitmap fill to the fill section and give the source of the image which you are planning to use(Hopefully this is a direct way of doing, may be you need to hack this a little to get it to work)

           

          I've never tried this, but should help you give some idea.