In standard a table wraps your text. You could try to add a the following
CSS class to the cell (td- element of the table), that should not wrap its
text.

.no-wrap {
  white-space: nowrap;
}

In the following example- HTML the text is not breaking although the table
has a width of 100px. The Table's width will grow up.

<table class="non-wrapping-table"width="100px" border="1">
  <tr>
    <td class="no-wrap">
      to long text, to long text, to long text, to long text
    </td>
  </tr>
</table>

If you want to say, that the complete table should not wraps its text you
can do it with CSS, instead of adding the no-wrap CSS class to each td
element.

.non-wrapping-table tr td {
  white-space: nowrap;
}

hope that will help...

-Danny

2009/3/30 Suren <[email protected]>

>
> Hi Danny,
>
> Thanks for the reply.
>
> I should have mentioned earlier that, I 've tried that option too.
> that is, I set the text to a label and disable the wordwrap to that
> label and add that label to a FlexTable using setWidget method.
>
> Result the same..
>
> Still I am getting either full long text with the increased width, or
> wrapped text with the proper width.
>
> All I want is some knid of truncated text( to appear like truncated
> text, but actually not, since that cell dont have enough space to
> display that)
>
> I have a doubt here. Did Flextable has the default settings to adjust
> the column width according to the text's length? And wrap the text if
> the width is set?
>
> If so, what if I dont want that functionality? I mean how can I
> disable that? apart from the wordwrap method
>
> Thanks
> Suren
>
>
>
> On Mar 30, 11:55 am, Danny Schimke <[email protected]> wrote:
> > Hi Suren!
> >
> > I dont know why this is not working, but you can use a Label, set the
> word
> > wrap of the label to false and add this label to one of your FlexTable's
> > cell. This should work.
> >
> > -Danny
> >
> > 2009/3/30 Suren <[email protected]>
> >
> >
> >
> >
> >
> > > Hi All,
> >
> > > I am using FlexTable in a grid format to display text. I have a
> > > situation like, the width of the particular column needs to be fixed.
> > > And in that case, I need to show whatever text is fit into that width.
> > > I dont want to use wordwrap, which inturn affects my layout. Or I dont
> > > want to display the full lengthy text too.
> >
> > > I 've tried
> > > [code]
> > > FlexTable f1 = new FlexTable();
> >
> > >        f1.setText(0, 0, "This is a very long text");
> > >        f1.setBorderWidth(2);
> > >        f1.getCellFormatter().setWidth(0,0,"2px");
> > >        f1.getCellFormatter().setWordWrap(0, 0, false);
> > > [/code
> >
> > > In the above case, I set the wordwrap to false, but still I am getting
> > > the wrapped text in the Flextable
> >
> > > Could anyone please suggest any ways to acheive this?
> >
> > > Thanks
> > > Suren- Hide quoted text -
> >
> > - Show quoted text -
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to