Hi Mogoye, Try explicitly setting the size of the PushButton to that of the image. ,For example, if your image is 64 x 64, call pushButton.setSize("64px", "64px"); and it should be sized appropriately. I tested this out in hosted mode on Windows XP / GWT 1.5.3 / IE6 by placing a PushButton in a HorizontalPanel, VerticalPanel, FlowPanel and Grid within a DockPanel.
Hope that helps, -Sumit Chandel On Wed, Jan 7, 2009 at 1:51 AM, Mogoye <black.mog...@gmail.com> wrote: > > In fact this problem appears when I run the code in hosted mode. > I've just notice that the same code once compiled and deployed on a > tomcat works fine. > > Is there a known bug with hosted mode ? > > > > > > > On 6 jan, 18:13, Mogoye <black.mog...@gmail.com> wrote: > > Hello all, > > > > I want to use PushButton with an image to define the look of the > > button. > > So my idea was to use the following code : > > > > Image img = _imgBundle.getImage("my_image.gif"); > > PushButton button = new PushButton(img); > > panel.add(button); > > > > I don't understand why but in some buttons, the image is well > > displayed, but sometimes > > image is adjusted to bigger or smaller size and the result is not > > really nice. > > > > My 1th question is : > > Does any one know why the image is some time adjusted and how can I do > > to be sure my image > > will be displayed without any change. > > > > I've an other question on the same topic : > > If the button is inserted in a Grid, the button is adjusted to fit the > > cell causing to have a large button with a small image inside and a > > lot of blank space. > > How can I do to be sure that button's size will be the size of the > > image ? > > > > Thanks for reading. > > > --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---