Hi, thank you for your reply
Actually, what you suggest doesn't work, because the image is correctly
positioned in the panel but now is the panel taking the whole space.
Unless there is some other trick, using a popup panel is the only solution
that works.
On Thursday, September 13, 2012 1:33:00 PM UTC+2, Andrei wrote:
>
> When you add a widget to a LayoutPanel, it takes up all the space unless
> you specify it's position (see below). Also, you can add only one widget to
> the RootLayoutPage. You can't add an image directly to it, unless your
> entire app consists of this image and nothing else.
>
> So, try this:
>
> img.setSize("12px", "12px");
> LayoutPanel panel = new LayoutPanel();
> panel.add(img);
> panel.setWidgetTopHeight(img, 100, Unit.PX, 12, Unit.PX);
> panel.setWidgetLeftWidth(img, 100, Unit.PX, 12, Unit.PX);
> RootLayoutPanel.get().add(panel);
>
> Alternatively, you can use a FlowPanel and set CSS style on the image, as
> you tried, and then add this FlowPanel to the root.
>
>
--
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/-/-1zfga6q5OoJ.
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.