How could this be realized? (see URL)

94 views
Skip to first unread message

Magnus

unread,
Jun 24, 2010, 9:52:13 AM6/24/10
to Google Web Toolkit
Hello,

I wonder how this can be realized:

http://www.jinchess.com/chessboard/composer/

I believe the left board is not a HTML Table or a subclass of it
(Grid, ...).

How would you do this?

Magnus

Thomas Broyer

unread,
Jun 24, 2010, 2:08:01 PM6/24/10
to Google Web Toolkit
1. Use any developer tool to inspect the HTML DOM (I think the
chessboard is actually probably a Grid)
2. Ask the developer directly?

Magnus

unread,
Jun 25, 2010, 2:35:10 AM6/25/10
to Google Web Toolkit
I am trying to do something similar with a Grid, but I have problems
with the pixel sizes:

- I cannot really contol the size of the cells. I can set the height,
but not the width. The width depends on the width of the whole grid
- when I add an image into a cell, the size of whole row/column may
change when the image is slightly too big

Of course one can deal with these things, by computing the size of the
whole grid, and using images with the correct sizes, but as a result
the whole thing is based on tricky workarounds and not really
predictable.

I am thinking about using the gwt-Canvas widget, but this is in an
experimental state and I don't know if I should build on it. What do
you think about this?

Thanks
Magnus

Andreas Horst

unread,
Jun 25, 2010, 2:50:44 AM6/25/10
to google-we...@googlegroups.com
Hey Magnus,

I had a similar problem where I had to control the dimensions of grid cells. Setting the dimension directly does not work. What I did then was to insert SimplePanel into each cell and set the dimension of these SimplePanels.

This is also sort of a workaround but you will not have to rely on Image sizes. You can simply adjust dimensions by methods of SimplePanel. You can even set background colors via getElement().getStyle().

Greetings,

Andreas

2010/6/25 Magnus <alpine...@googlemail.com>

--
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-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
Andreas Horst
Sohnreystraße 8, 30173 Hannover
Tel. +49 (0)170 4162251, mailto:horst.a...@googlemail.com
Reply all
Reply to author
Forward
0 new messages