Friday, September 24, 2010

Re: Issue about adding image icons into FlowPanel

Falcon,

Thanks for reply. I am using the code below to display the images.
Can you tell me how to lay the images inline?
public interface Images extends ClientBundle {
@Source("OPEN.JPG")
ImageResource open();
@Source("CUT.JPG")
ImageResource cut();
@Source("PASTE.JPG")
ImageResource paste();
@Source("COPY.JPG")
ImageResource copy();
}

public void display() {
FlowPanel toolPanel = new FlowPanel();
Images images = GWT.create(Images.class);
PushButton openButton = new PushButton(new
Image(images.open()));
toolPanel.add(openButton);
PushButton cutButton = new PushButton(new
Image(images.cut()));
toolPanel.add(cutButton);
PushButton pasteButton = new PushButton(new
Image(images.paste()));
toolPanel.add(pasteButton);
.
.
.
}

Thanks!

On Sep 24, 11:57 am, Falcon <msu.fal...@gmail.com> wrote:
> Each PushButton is wrapped in a div, which is a block-level element.
> You'll need to change the divs to inline, inline-block, or float them
> in the PushButton style settings.
>
> On Sep 23, 3:15 pm, Michelle Mu <mmumail2...@gmail.com> wrote:
>
>
>
> > I need to add some small image icons(16*16) into a flowPanel. But the
> > image icons do not lay on a line. Each image icon occupies one line.
> > Can some one tells me what the problem is. My code sample is below:
>
> >                                 FlowPanel toolPanel = new FlowPanel();
> >                 Images images = GWT.create(Images.class);
> >                 PushButton openButton = new PushButton(new Image(images.open()));
> >                 toolPanel.add(openButton);
> >                 PushButton cutButton = new  PushButton(new Image(images.cut()));
> >                 toolPanel.add(cutButton);
> >                 PushButton pasteButton = new PushButton(new Image(images.paste()));
> >                 toolPanel.add(pasteButton);
>
> >  Thanks for help.- Hide quoted text -
>
> - Show quoted text -

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment