2 Replies Latest reply on Apr 17, 2011 7:30 AM by saisri2k2

    How to set background color of <s:Group>

    rodphoenix

      I want to set <s:Group> background color,my code is follows:


      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/mx" width="90%" height="90%">
      <fx:Style source="test.css"/>

      <s:Group width="100%" height="400" color="#A94949">
        <mx:Image source="@Embed('../images/sg.jpg')" left="10" bottom="167"/>
        <mx:Image x="153" y="107" source="@Embed('../images/sh.jpg')"/>
        <mx:Image x="460" y="107" source="@Embed('../images/hl.jpg')"/>
        <mx:Image x="312" y="29" source="@Embed('../images/sy.jpg')"/>
      </s:Group>
      <fx:Declarations>
      </fx:Declarations>
      </s:Application>


      test.css file  is follows:

      /* CSS file */
      @namespace s "library://ns.adobe.com/flex/spark";
      @namespace mx "library://ns.adobe.com/flex/mx";


      global
      {
      font-size: 20;
      background-color: #0F6;
      }


      When I run above code,I find <s:Group> background color is still white!  I can't find the background attribute of <s:Group>. How to set <s:Group> background color?