CellSpacing - CellPadding

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

CellSpacing - CellPadding

Postby ashouric » Sat Jan 13, 2007 2:00 am

Dear All,

GWT Designer considers FlexTable.cellSpacing and .cellPadding to be 0 by default if they are not defined, however this is not true (at least in IE).

Consider the below example, if you uncomment the two settings, you will have different result.

I suggest allowing GWT designer to have both values to be 'null/empty' by default, unless explicitly typed 0, which would be treated as non-default int, and code would reflect that.

Many thanks.

Code: Select all
public class Spacing extends Composite {

   public Spacing() {
      final FlexTable flexTable = new FlexTable();
      initWidget(flexTable);
      
      //They must be explicitly defined
//      flexTable.setCellPadding(0);
//      flexTable.setCellSpacing(0);
      
      //background is red
      flexTable.setStyleName("mytable");
      flexTable.setSize("500", "500");

      final Image image = new Image();
      flexTable.setWidget(0, 0, image);
      flexTable.getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_BOTTOM);
      flexTable.getCellFormatter().setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_RIGHT);
      flexTable.getCellFormatter().setHeight(0, 0, "100%");
      flexTable.getCellFormatter().setWidth(0, 0, "100%");
      setSize("500", "500");
      image.setUrl("small.jpg");
   }

}
ashouric
 
Posts: 75
Joined: Sat Sep 30, 2006 9:13 pm

Re: CellSpacing - CellPadding

Postby Eric Clayberg » Sat Jan 13, 2007 4:23 pm

ashouric wrote:GWT Designer considers FlexTable.cellSpacing and .cellPadding to be 0 by default if they are not defined, however this is not true (at least in IE).

This was actually caused by a bug in GWT (GWT actually returned "0" as the default for both).

We now have a work around in place for the latest build.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 3 guests