Friday, December 25, 2009

Re: Grid cell formatting

I think you would need to create a css style like...

.table-cell: {
align: left;
valign: top;
}

but you wold still have to iterate through each one of your cells and
do addStyleName("table-cell") or something like that. because align
and valign could be different for <td>, <tr>, and <tbody>... so you
just have to specify what you really mean... just a hunch (not an
expert :) )


On Dec 25, 8:05 am, Paul Grenyer <paul.gren...@gmail.com> wrote:
> Hi All
>
> How can I do this:
>
> public class Grid extends com.google.gwt.user.client.ui.Grid
> {
>         public Grid(int rows, int columns)
>         {
>                 super(rows, columns);
>
>                 for(int x = 0; x < columns; ++x)
>                 {
>                         for(int y = 0; y < rows; ++y)
>                         {
>                                 this.getCellFormatter().setAlignment(y,x,HasAlignment.ALIGN_LEFT,
> HasAlignment.ALIGN_TOP);
>                         }
>                 }
>         }
>
> }
>
> in CSS? All I want to do is specify that all cells have a left
> justified horizontal alignment and a top justified vertical alignment.
>
> Thanks!
>
> --
> Thanks
> Paul
>
> Paul Grenyer
> e: paul.gren...@gmail.com
> b: paulgrenyer.blogspot.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-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.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate