Mega Code Archive

 
Categories / Flex / Container
 

Background fill for BorderContainer

<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:s="library://ns.adobe.com/flex/spark">     <mx:Script>                      import mx.graphics.BitmapFillMode;            </mx:Script>          <mx:Style>         @namespace s "library://ns.adobe.com/flex/spark";         @namespace mx "library://ns.adobe.com/flex/halo";                  .imageBorder {             backgroundImage: Embed(source='a.png');             backgroundImageFillMode: repeat;         }        </mx:Style>     <s:BorderContainer width="200" height="200" cornerRadius="10" borderStyle="inset">         <s:layout>             <s:VerticalLayout paddingLeft="5" paddingTop="5" paddingBottom="5" paddingRight="5" horizontalAlign="justify" />         </s:layout>         <mx:Label text="Lorem ipsum dolor sit amet consectetur adipisicing elit." />         <mx:Button label="click me" />         <s:backgroundFill>             <s:BitmapFill source="@Embed('a.png')" fillMode="{BitmapFillMode.REPEAT}" />         </s:backgroundFill>     </s:BorderContainer> </mx:Application>