Specifying cell width in cellTable

18 views
Skip to first unread message

Issam

unread,
Jun 30, 2011, 9:20:00 AM6/30/11
to Google Web Toolkit
I'm working with CellTable and Inuptcells and I would like to specify
the width of each instance on my inputCell.
Anyone has an idea?

Thanks

icamts

unread,
Jun 30, 2011, 9:42:59 AM6/30/11
to google-we...@googlegroups.com
Hi,
for columns width have a look at


For each input width you may need to provide your own version of the Inputcell: customize render method.

Cheers,
Luca

Issam

unread,
Jun 30, 2011, 9:47:07 AM6/30/11
to Google Web Toolkit
Thank you for your answer
But the problem is that I'm working by GWT 2.1 and I can't use the
method cellTable.setColumnWidth(column, width, unit)

So any help ?

On 30 juin, 15:42, icamts <ica...@gmail.com> wrote:
> Hi,
> for columns width have a look at
>
> http://code.google.com/intl/it-IT/webtoolkit/doc/latest/DevGuideUiCel...

Luca

unread,
Jun 30, 2011, 10:23:33 AM6/30/11
to google-we...@googlegroups.com
It seems GWT 2.3 CellTable creates this DOM structure

...
<thead>
...
</thead>
<colgroup>
    <col width="...">
    ...
</colgroup>
<tbody>
...
</tbody>
...

and sets width in each col element...
Try to do the same in your view code. (GwtQuery may be useful.)

Cheers,
Luca




2011/6/30 Issam <bouale...@gmail.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.


Andrei Volgin

unread,
Jun 30, 2011, 9:24:49 PM6/30/11
to Google Web Toolkit
If all cells are the same width, give this table a style name, and add
a CSS rule for cell width:

.myTabe td {
width: 100px !important;
}

I use this approach to set the height of rows in CellTable, where
empty rows have a different height from the ones with data.

Andrei
Reply all
Reply to author
Forward
0 new messages