Hi Anders
Here is the code to display an image at the bottom right of the panel:
public void onModuleLoad() {
// logo.png is a 153x14 pixel image.
Image logo = new Image("images/logo.png");
HorizontalPanel panel = new HorizontalPanel();
// always good to set the border to see the panel size
panel.setBorderWidth(1);
panel.setSize("100%", "100%");
panel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
panel.add(logo);
RootPanel root = RootPanel.get();
root.setSize("100%", "100%");
root.add(panel);
}
Hope this is useful to you :-)
On Sat, May 2, 2009 at 6:29 PM, dduck <[email protected]>wrote:
>
> Hi,
>
> If I add an image to a panel, it is apparently always left-justified,
> no matter what horizontal justification I set the panel to use.
>
> Is there a way of doing this?
>
> Regards,
> Anders
> >
>
--
Hez
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
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
-~----------~----~----~----~------~----~------~--~---