Try setting the border width on the Grid instance to 0: http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/HTMLTable.html#setBorderWidth(int)
- Andreas On 28 Jun., 09:43, Magnus <[email protected]> wrote: > Hi Andreas, > > thank you! > > I found out something: > > I thought I could get a solution by inserting images of the correct > pixel size into each cell. > > So I created transparent images with the exact pixel sizes: > 50x50 for the inner cells, 50x10 for the horizontal borders, 10x50 vor > the vertical borders. > > As a result, I found out that there is always some vertical space > between the images, one or some pixels. I also found out, that the > pixel size of the whole grid has changed after inserting the images, > so that it is not a square anymore. > > I inserted some visible pixels into the transparent images, and I > verified that there is vertical space between the images. > > (I set cellspacing and cellpadding to 0) > > How can I get the grid to show its cells without any space? > > Thanks > Magnus > > On 27 Jun., 12:59, andreas <[email protected]> wrote: > > > > > Hey, > > > maybe this can help you: > > >http://groups.google.com/group/google-web-toolkit/msg/f59a0c87d0cf300e > > > On 27 Jun., 07:23, Magnus <[email protected]> wrote: > > > > Hi, > > > > I need a Grid with the following simple requirements: > > > > - 10 * 10 cells > > > > - inner 8*8 cells (form a chess board): > > > rows 1-8; cols 1-8: pixel size 50 * 50 > > > > - outer cells (form the annotations, e. g. "A", "1"): > > > rows 0 and 9: pixel height: 10 > > > cols 0 and 9pixel width: 10 > > > > The total pixel size of the grid must therefore be 8*50 + 2*10 = 420 > > > (width and height). > > > > I cannot get this realized with a grid. Although I set the pixel sizes > > > for every cell, it's never correct. The annotation cells are always of > > > the same size as the other cells. > > > > Below is my code. > > > > What can I do? > > > > Thanks > > > Magnus > > > > private void init () > > > { > > > setPixelSize (420,420); > > > > grd.setPixelSize (420,420); > > > grd.setBorderWidth (0); > > > grd.setCellPadding (0); > > > grd.setCellSpacing (0); > > > > CellFormatter cf = grd.getCellFormatter (); > > > > // set the inner cells > > > > for (int y = 1;y < 9;y++) > > > for (int x = 1;x < 9;x++) > > > { > > > String s; > > > > if (((x + y) & 1) != 0) > > > s = "blackCell"; > > > else > > > s = "whiteCell"; > > > > cf.addStyleName (y,x,s); // just the cells color, no sizes here > > > cf.setWidth (y,x,"50px"); > > > cf.setHeight (y,x,"50px"); > > > } > > > > // set the outer cells > > > > for (int x = 0;x < 10;x++) > > > { > > > cf.setHeight (x,0,"10px"); > > > cf.setHeight (x,9,"10px"); > > > } > > > > for (int y = 0;y < 10;y++) > > > { > > > cf.setWidth (0,y,"10px"); > > > cf.setWidth (9,y,"10px"); > > > } > > > }- Zitierten Text ausblenden - > > > - Zitierten Text anzeigen - -- 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.
