How to insert a background image in VGroup in Flex Mobile

I want to insert a background image for this VGroup. Help me out. I'm new to Flex !!
I'm using this code in Flex Mobile Application
<s:VGroup height="100%" width="100%"
          paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">   
    <s:List id="homeList" height="100%"
            labelField="title"
            dataProvider="{homeNews}">
        <s:layout>
            <s:TileLayout requestedColumnCount="1"
                          verticalGap="5"/>
        </s:layout>
        <s:itemRenderer>
            <fx:Component>
                <s:ItemRenderer>
                    <s:VGroup>
                        <s:BitmapImage source="{data.source}"/>
                        <s:Label text="{data.title}" />
                    </s:VGroup>
                </s:ItemRenderer>
            </fx:Component>
        </s:itemRenderer>
    </s:List>
</s:VGroup>

I don't think you can add a background image to a VGroup directly, nor can VGroup be skinned.
As far as I am aware there are probably 2 solutions
1) use a SkinnableContainer instead skin the container to have a background image and set its layout to VerticalLayout
2) enclose the VGroup in a Group with a BasicLayout. you can then add a background image to the Group and overlay the VGroup

Similar Messages

  • How to insert a background file in a word file using jacob?

    how to insert a background image file in a existed word file using jacob and set the image as behind text?
    Also, where I can find the documentation for jacob,
    Thx very much.

    Go to http://www.simtel.net/pub/pd/60701.html

  • Inserting a background image on JFrame

    I am developing an interactive system for the london 2012 olympics (Not a real one, just a project :-)) I am starting by creating my GUI layout. This is where i have started.
    import java.awt.*;        
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.util.*;
    import java.awt.event.KeyListener;
    import java.io.*;
    import java.text.*;
    public class Assignment extends JFrame  
       private JLabel londOnJLabel;
    public Assignment()
              ImageIcon image = new ImageIcon("???.jpg");
              JLabel background = new JLabel(image);
              background.setBounds(0, 0, image.getIconWidth(), image.getIconHeight());
              getLayeredPane().add(background, new Integer(Integer.MIN_VALUE));
    private void createUserInterface()
              Container contentPane = getContentPane();
              contentPane.setLayout( null );
              londOnJLabel = new JLabel();
              londOnJLabel.setBounds( 19, 19, 875, 28 );
              londOnJLabel.setText( "LONDON 2012" );
              londOnJLabel.setFont(new Font( "Default", Font.BOLD, 36 ) );
              londOnJLabel.setHorizontalAlignment(JLabel.CENTER );
              contentPane.add( londOnJLabel );
              setTitle( "LONDON 2012" );
              setSize( 1000, 750 );         
              setVisible( true );         
    public static void main( String[] args )
          Assignment application = new Assignment();
          application.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    }So at the moment this Just displays LONDON 2012 on my application. Now what i would like to try and do is insert a background image of the olympic rings. How would i go about doing this?
    cheers

    THFC wrote:
    sorry, when u say dont subclass JFrame, are you referring to this?
    public Assignment() ....
    No I meant don't do this: public class Assignment extends JFrameBut rather do this: do this: public class Assignment extends JPanelFor example:
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Font;
    import java.awt.Graphics;
    import java.awt.image.BufferedImage;
    import java.io.IOException;
    import java.net.URL;
    import javax.imageio.ImageIO;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    public class Assignment2 extends JPanel
      private static final String FILE_PATH = "myImageFile.jpg"; // !! change this
      private static final String NET_URL_PATH = "http://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Mooring_bollard_at_sunset%2C_Lyme_Regis.jpg/800px-Mooring_bollard_at_sunset%2C_Lyme_Regis.jpg";
      // Photo by Michael Maggs, Wikimedia Commons: http://commons.wikimedia.org/wiki/Image:Mooring_bollard_at_sunset%2C_Lyme_Regis.jpg
      private BufferedImage image = null;
      public Assignment2()
        try
          // first load the image
          //image = ImageIO.read(new File(FILE_PATH));
          image = ImageIO.read(new URL(NET_URL_PATH));
        catch (IOException e)
          e.printStackTrace();
        // then set up the JPanel.  Try to avoid using the "null" layout
        JLabel titleLabel = new JLabel("My Title Goes Here");
        titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD, 36));
        titleLabel.setForeground(Color.lightGray);
        JPanel titlePanel = new JPanel();
        titlePanel.setOpaque(false);
        titlePanel.add(titleLabel);
        setPreferredSize(new Dimension(800, 590));
        setLayout(new BorderLayout());
        add(titlePanel, BorderLayout.NORTH);
      @Override  // here's where I paint my background:
      protected void paintComponent(Graphics g)
        super.paintComponent(g);
        if (image != null)
          g.drawImage(image, 0, 0, this);
      private static void createAndShowUI()
        // Then I only create my JFrame when I need it.  I don't override it.
        // This way, I can use this same code in a JApplet, or a JDialog, or whatever
        JFrame frame = new JFrame("Assignment2");
        frame.getContentPane().add(new Assignment2()); // and add the JPanel to the JFrame here
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
      public static void main(String[] args)
        java.awt.EventQueue.invokeLater(new Runnable()
          public void run()
            createAndShowUI();
    }Edited by: Encephalopathic on May 26, 2008 4:11 PM

  • Inserting Random Background Images

    Hi
    Can someone please please help me. I have a very simple Flash
    movie where I
    want to insert a random background image every time the movie
    plays or the
    web page is refreshed.
    I found the following script online but need a step by step
    idiot¹s guide
    how to add it to the original Flash file.
    randomClips = new Array ("background0.jpg",
    "background1.jpg",
    "background2.jpg", "background3.jpg");
    function randomBackground() {
    randomNumber = random (randomClips.length);
    _root.mtClip.loadMovie (randomClips[randomNumber]);
    randomBackground();
    Cheers
    Sally

    > This message is in MIME format. Since your mail reader
    does not understand
    this format, some or all of this message may not be legible.
    --B_3299484431_177155
    Content-type: text/plain;
    charset="ISO-8859-1"
    Content-transfer-encoding: 8bit
    Hi
    Many many thanks. This is practically the same as Rob from
    Action Script
    Group suggested. You are both geniuses!!! I didn¹t
    though alter the size
    of the stage as I have an existing movie.
    Thanks again,
    Take care
    With kind regards
    Sally
    --B_3299484431_177155
    Content-type: text/html;
    charset="ISO-8859-1"
    Content-transfer-encoding: quoted-printable
    <HTML>
    <HEAD>
    <TITLE>Re: Inserting Random Background
    Images</TITLE>
    </HEAD>
    <BODY>
    <FONT FACE=3D"Verdana, Helvetica, Arial"><SPAN
    STYLE=3D'font-size:12.0px'>Hi<BR=
    >
    <BR>
    Many many thanks.  This is practically the same as
    Rob from Action Scr=
    ipt Group suggested.   You are
     both geniuses!!!  I didn=
    &#8217;t though alter the size of the stage as I have an
    existing movie. &nb=
    sp;<BR>
    <BR>
    Thanks again,<BR>
    <BR>
    Take care<BR>
    <BR>
    With kind regards<BR>
    <BR>
    Sally<BR>
    </SPAN></FONT>
    </BODY>
    </HTML>
    --B_3299484431_177155--

  • Inserting table background images [was: CS4 DW]

    Dear all,
    I've have trouble inserting the background images in a cell of a table. When I was using CS3 I had the options of selecting BG color or image, as well as choosing the border color.
    Right now in CS4 I can't even insert one in a cell, only color bg, and also editing the font size, color, type..
    Can anyone advise?
    Z

    CSS code uses a different syntax than HTML code.
    With CSS you can use a background-color: #FFF or a background-image (URL).  This can point to an absolute URL:
    background: url (http:yoursite.com/images/bg-image.jpg)
    or to an image in your  DW local site folder:
    background: url (some-folder-in-your-local-site/image.jpg)
    For more  HTML & CSS Tutorials - http://w3schools.com/
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • How to put the background image in Title Window?

    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.

    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

  • I would like to know how to stretch a background image using HTML

    Hello Seniors of Sun,
    I gota small doubt in HTML, can any one please help me in solving it,
    I would like to know how to stretch a background image using HTML? I have tried and tried to figure this out and cannot..
    so any one kindly help me in this...
    waiting for reply...

    Please note that this is not an HTML forum.
    You can use an image tag on a DIV positioned behind the rest of the page, so that could actually work. And if you want to use body:background, then look up an HTML/CSS reference and see if there are any other body attributes or CSS stuff that applies to the background image.

  • How to repeat a background image to cover the height of the page?

    Hi
    I have a page with an image alinged to the top in a table and
    I have a pattern in the background of the cell in the same table
    I need that background of the cell to repeat it self along
    the height of the page, so when someone views the page at a higher
    resolution, the background image will repeat it self to cover the
    extra space.
    I've tried setting the height of the table to percentage, but
    the table doesn't cover the height of the page.
    I could also make the table really long so when viewed at
    higher resolution there wont be any blank space at the bottom, but
    this makes an unnecessary and long scroll when viewed at lower
    resolution.
    Someone told me to use css but i have now idea how to
    implement that.

    make sure you have set your page margins to 0 if you don't
    want the default
    margin top left. Cut and paste the following into the head of
    your document
    just before the closing </head> tag.
    then if you want to repeat a background image in a cell, you
    need to create
    a rule to do this:
    .cellback {
    /*this repeats the image across the page horizontally*/
    /* if you want to repeat down the page, then change to
    repeat-y */
    background: url(pics/whatever.gif) repeat-x;
    you can combine this background image rule with the other
    margin setting so
    you have:
    <style type="text/css">
    <!--
    body {
    margin: 0;
    padding:0;
    .cellback {
    background: url(pics/whatever.gif) repeat-x;
    -->
    </style>
    You then apply to the class to your cell
    <td clas="cellback">
    Examples here:
    http://www.dreamweaverresources.com/tutorials/pagebackgrounds/cellbackground.htm
    this shows how to use a background image for your entire
    page:
    http://www.dreamweaverresources.com/tutorials/pagebackgrounds/examplehor.htm
    Nadia
    Adobe� Community Expert : Dreamweaver
    http://www.csstemplates.com.au
    - CSS Templates | Free Templates
    http://www.perrelink.com.au
    - Web Dev
    http://www.DreamweaverResources.com
    - Dropdown Menu Templates|Tutorials
    http://www.adobe.com/devnet/dreamweaver/css.html
    > I have a page with an image alinged to the top in a
    table and I have a
    > pattern
    > in the background of the cell in the same table
    > I need that background of the cell to repeat it self
    along the height of
    > the
    > page, so when someone views the page at a higher
    resolution, the
    > background
    > image will repeat it self to cover the extra space.

  • Flex4 How to set background image in Vgroup..?

    Hi.,
            I have using v flex 4 vgroup to set background image., but image was not display.. any change my code.,
    <fx:Style>
          .backgroundImage
                color:#808080;
                fontWeight:bold;
                fontSize:18;
                fontStyle:italic;
                contentBackgroundColor : #FFFFFF ;
                backgroundImage:Embed("assets/Green Apple.jpeg");
    </fx:Style>
    <s:VGroup paddingBottom="10" width="100%"  height="600" paddingTop="10"  styleName="backgroundImage">
        <s:Label text="hai hai hai">
             </s:Label>
           </s:VGroup>
    any solution to solve this....
    With Regards.,
    LinFlex-

    @Peter
    Yes! This works well now. Now I can get repeating background images directly in the code as well as in my CSS style sheets.  This looks good and helps me a lot as there are lots of occasions for me using this. I've gotten used to having repeating image backgrounds in HTML and missed that in Flex 3. This feature alone makes moving to Flex 4 worthwhile.
    This works fine for me:
    <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">
      <!--make a background for the whole page  -->
        <s:BorderContainer width="100%" height="100%"
             backgroundImage="@Embed('images/bkg/grey_grid.gif')"
             backgroundImageFillMode="repeat" >
      <!--make an inner area with a graphic background  -->
            <s:BitmapImage id="legalPad"
                  source="@Embed('images/bkg/legalPad.gif')"
                  fillMode="repeat"
                  left="40" top="100"
                  width="825" height="200" />
        </s:BorderContainer>
    </s:Application>
    Here are the images I used:
    grey_grid.gif
    legalPad.gif

  • How can i insert a background image in a fluide grid DW CC

    I want a background image for a fluid grill website and cannot seem to find the "how to". Any help would be greatly appreciated.
    Regards
    Animal86

    It's the same as adding a background to any Layout.  Use CSS & the background property on your body selector.
    body {
    background: url(your_BG.jpg)
    Nancy O.

  • How to create a background image for each item in a List object

    Hello.
    I am trying to create a background image that displays whenever a user posts something to a list.  For example when a user posts text it would appear in a list.  The new item in the list would contain a specific background image with the users text appearing on top of the background image.  I do not want a background image for the entire list, rather each item within the list.
    I am not sure how clear this is so I added an image below.  When a user enters text in and clicks the "post-it" button their text would appear below with the sticky note background. 
    I am not sure which list type would be best for this problem or how to create insert the image, so I am open to suggestions. 
    Thank you for your help.  Any advice or guidance will be greatly appreciated!

    Hi
    the easiest way would be with itemRenderer.
    You have to do two things:
    1. In your list declaration use a item renderer: <mx:List itemRenderer="myRenderer"/>
    2. create a flex component myRenderer that will be the single item. This can be a canvas with a background image and a text field on it.
    When you add a new item to the list, a new myRenderer item will be created and the data property will be passed to it. So you have to put "data" in your textField.
    If you need more help try looking at Tour de Flex samples, they're pretty easy.
    Andrei

  • How to insert a flying image in a video

    How to insert flying images  in a video...someone it's speaking in the left side and in the right side some flying pictures are coming, staying for 2-3 seconds one by one....some ideas???
    Like the weather forecast...you have someone in the left side speaking and she is showing some images in the right side.
    Please let me know if you know how it can be done this in after effects or with another video editor...
    Thanks!!!

    It can be done in either. There are 3 steps.
    Learn about greenscreen (keying) including lighting, filming, best formats for video (the way they do it in the weather segment) or masking and roto.
    learn about image editing including sizing images, color correcting, applying effects
    learn about controlling motion and editing duration of stills in a NLE or After Effects
    When you have a few of these basics down and have designed your production you then load up the video and the stills, key out the background or mask around your talent to separate the talent from the background, add your photos to the time line and animate their duration and position.
    This is extremely basic stuff that can be accomplished in a NLE or in AE. You can basically reproduce just about any effect you've ever seen in a movie in AE with the right planning and plug-ins. You can do just about anything you've ever seen in a news broadcast in any modern NLE.

  • Inserting table background image

    I just upgraded from DW8 to CS4 and can't figure out how to
    insert an image for a table background! The box and folder icon to
    browse to the file I want is greyed out. Can anyone help?

    This is CS4's way of telling you that you have to use CSS for
    such things.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "tsheridan" <[email protected]> wrote in
    message
    news:gmb557$pu0$[email protected]..
    >I just upgraded from DW8 to CS4 and can't figure out how
    to insert an image
    >for a table background! The box and folder icon to browse
    to the file I
    >want is greyed out. Can anyone help?

  • How can put a background image in a simple_text?

    hi,
    i've alredy builded a page with tabs on it. in one of these tabs-sites i puted
    a simple_text. now my question: how can i put a background image in that
    simple_text?
    i already tried to put it in the HTML code but it doesn't work.
    i'm able to insert images to a area as a simple_image so my pathes are working.
    thanks for help

    You cannot set the background image for a simple text directly. But you can
    1. create a style, and define the Background image for this style
    2. edit the region which the simple text item is on, set the region style to be the one you created on (1)

  • How to place a background image, so that the text layer, without having to use a text box

    Hello,
    I have a problem with the placement of the background image. When I normally formatted text on a page and add the image you want on the background of the text and the handle on the back is still image over text, just no longer responds to wrap text.
    The second problem is adding a new page to the document. I have unfinished document and I need to add a page before the current ... how?
    This is a new Pages.
    Thanks for the advice

    Helps to know exactly what version of Pages you are using.
    I assume Pages 5.1. But the last post makes me wonder.
    Text Wrap only works on text under an object. Either it is in front causing text wrap or it is in the background with none. It is unclear what you are trying to achieve.
    Click at the very beginning of your text:
    Insert > Section Break/Page Break
    Peter

Maybe you are looking for

  • Nav bar doesnt line up in browsers - help please

    Hi All Well I spent another day trying to get this to look the way I want to and again I just cant seem to do what I thought would be an easy thing, I have upload so you can see this http://homepage.ntlworld.com/j.beauchamp/test.htm Ok in firefox it

  • Caching issue with VO

    Hi, I deployed my OAF application on the server, things work as expected. I made a change to the VO select statement. I put the VO xml, new file on the server. I have cleared the cache in R12 using the caching framework, bounced Apache. I still see t

  • Servelt best practices

    I have a single page that displays two lists, one for javascript generated dropdowns and another for the results of its selection. The dropdown list needs to be on every page. Lets just say I am searching for horses by state and county. I think the n

  • Error when clicking on refresh all button in excell add in

    Hi All One of our users is facing an issue when clicked on the refresh all button on excel. Below is the error she is getting. "Request Definition has been changed on server since last download. Please use edit Prompts and levels to select new filter

  • Finding X11.app

    I need the x11.app program for something, but I have no idea where to find it! Can someone direct me to it, please?