the css is simple
.backGroundImage1{
background-image:url(images/line.png');
background-repeat:repeat-x;
}
the gwt code is
public class TestFlowPanelLeft extends FlowPanel {
public void onLoad(){
Image image1 = new Image();
image1.setUrl("/images/smallImg1.JPG");
image1.setSize("100px", "100px");
image1.setStyleName("floatLeft");
FlowPanel flowPanel1 = new FlowPanel();
flowPanel1.add(image1);
this.add(flowPanel1);
HorizontalPanel line1 = new HorizontalPanel();
line1.addStyleName("backGroundImage1");
line1.setWidth("200px");
this.add(line1);
}
}
the image1 can be shown, so it proof the path "/images/XX.png" is correct,
but the backGroundImage1 cannot be shown, what is the reason?
also, I cannot use ImageBundle and already give up after several try, so I
still prefer to use this method.
I try to use background image because I want to do something like
Title1--------------------------------------------------------
abc
def
Title2--------------------------------------------------------
fbg
the "------------" cannot be hardcode use "--" because when the browser
window minimize, the line will broken to two line, so I want to use image
of line and set its width to 100% of a horizontalpanel, in fact, is this
method feasible?
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-web-toolkit/-/MiUMd9DzJM0J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.