Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    .setBackgroundImage("where is my Image"

    Hello,

    I have been trying to set the background of a layout.

    All the documentation says is basicly "The name of the Image file".

    I have the image that I want in my war directory:
    Project/war/Image/MyImage.png
    The .html is:
    Project/war/index.html
    The .java is:
    Project/src/my.client.Application.java

    I can build my Window, add a Menu in a HLayout at the top, just want to set
    the background of my HLayout to MyImage.png and repeat-x to fill.

    HLayout layout = new HLayout();
    layout.setBackgroundImage("/Image/MyImage.png");
    // this is relative to my index.html as I would use with css
    // that is what I think the documentation says.
    layout.setBackgroundRepeat(BkgndRepeat.REPEAT_X);

    Just can't seem to get it.

    Thanks

    Raney
    I have tried

    #2
    I think it directly looks into image folder.Try "MyImage.png" directly

    Comment


      #3
      Got It.

      layout.setBackgroundImage("MyImage.png");
      layout.setBackgroundRepeat(BkgndRepeat.REPEAT_X);

      As this is it automagically look in:
      Project/war/images

      All I did was create a directory called images ans move the file to that
      directory.

      Raney

      Comment

      Working...
      X