3 Replies Latest reply on Feb 1, 2011 11:36 PM by ProjectedSurplus

    How to put the background image in Title Window?

    Jamilee (",)

      Hi,

       

      I'm newbie in flex. I 'm using Flex 4.

       

      Can anyone give me some guidelines on how to put the background image in Title Window?

       

      Is it possible to do this?

       

      Thanks.

        • 1. Re: How to put the background image in Title Window?
          Anitha Selvaraj Level 2

          Hi,

           

          Check the below sample code

           

          <?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" minWidth="955" minHeight="600">
              <fx:Declarations>
                  <!-- Place non-visual elements (e.g., services, value objects) here -->
              </fx:Declarations>
              <fx:Style>
                  @namespace s "library://ns.adobe.com/flex/spark";
                  @namespace mx "library://ns.adobe.com/flex/mx";

           

                  s|BorderContainer {
                      background-image:Embed(source="image/wheres_the_green_rez.jpg");
                      background-image-fill-mode:clip;
                  }

           

              </fx:Style>
              <s:TitleWindow width="100%" height="100%">
                  <s:BorderContainer width="100%" height="100%"/>
              </s:TitleWindow>
          </s:Application>

           

          Regards,

          Anitha

          • 2. Re: How to put the background image in Title Window?
            Jamilee (",) Level 1

            Hi Anitha Selvaraj,

             

            Thanks for your help.

             

            Your sample code is really useful for me, thank you very much.

             

            Can I remove the header of the Title Window and put the close button at the right hand side of the background image and make the corner to be rounded as below?

             

            123.jpg

             

            Regards,

            Jamilee (",)

            • 3. Re: How to put the background image in Title Window?
              ProjectedSurplus Level 1

              I'm looking to do something similar except my premise is a "page"  containing a datagrid of search results appear on a background image of a  clipboard.

               

              I've played around with the TitleWindowSkin.mxml settings and can get rid of the control bar etc but am beginning to wonder if I should instead just extend Panel myself, especially since I want it to be resizable as well.

               

              Any comments?  (I'm a relative newbie as well)