is assigned to the button and that worked...
I.e. Image image = new Image(source);
image.setWidth("100px");
image.setHeight("50px");
PushButton button = new PushButton(image);
I think if your image is really huge and only used for the button, it
is indeed smarter though, to make a smaller copy and resize that,
since if you let the browser resize, it still needs to load the full
image from the server (if I'm not mistaken...)
I don't understand what exactly you mean by "button floating over the
image" though, so I can't give you any tip about that...
Greetz
On Nov 2, 10:33 pm, David Cox <cox.spir...@gmail.com> wrote:
> Hi everyone
>
> I thought I would pick up gwt and play around with trying to make some
> pretty standard stuff. But, I have been bashing my head on this one
> for a bit.
>
> I have a horizontal layout with [button - image - button] and have
> managed to make the buttons cycle through a number of images.
> Now I want to pretty up the buttons by making them into images of
> arrows. This is fine using code like:
>
> private PushButton LeftButton = new PushButton(new Image("images/gui/
> left.png"));
> or
> LeftButton.setStyleName("mainleftbutton"); and then doing it in CSS.
>
> However, my arrow pictures are huge and (while i could make many
> copies with photoshop) what I would really like to do is be able to
> code it so that the button (and image) is scaled to a specific width.
> ie: like 100px high.
>
> I guess the end goal here, would eventually have the buttons floating
> over the image, but i suppose that is a long way off for me.
>
> Any suggestions?
> David
--
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