I achieved to avoid the word wrap after a long session with google and
trying different things. And only for IE!
Tables are old elements of HTML with a lot of css-options to render.
I did several things, probably some of them are not needed, I expect
to not have forgot anyone.
In my widget constructor, I tried and finally commented (my widget
extended FlexTable) :
// DOM.setStyleAttribute( this.getElement( ), "word-wrap", "normal");
// DOM.setStyleAttribute( this.getElement( ), "white-space",
"nowrap");
For the 1st row (header)
getRowFormatter( ).setStyleName( 0, "table-header");
For each row:
getRowFormatter( ).setStyleName( j, "table-row");
getCellFormatter( ).setWidth( 0, j, width); /* I fixed
each column here, in the header cells */
For each cell:
getCellFormatter( ).setWordWrap( i, j, false);
getCellFormatter( ).setWidth( i, j, "100%");
label = new Label( text);
label.setTitle( text);
label.setStyle( "table-cell");
And the css:
.table-cell{
white-space: nowrap;
overflow: hidden;
}
.table-row {
white-space: nowrap;
...
}
.table-row td,th{
white-space: nowrap;
overflow: hidden;
}
.table-header {
white-space: nowrap;
...
}
.table-header td,th {
white-space: nowrap;
...
}
.table{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
table-layout: fixed;
margin-left:auto;
margin-right:auto;
.....
}
On Mar 30, 12:45 pm, rudolf michael <
roud...@gmail.com> wrote:
> that's because your text is wrapped inside a div and not inside the td of
> the table.
> you either use setHTML instead of set widget and keep the style on the felx
> table td or if you're using setWidget then you need to apply the stylename
> on the label and not the td of the flex table.
>