my dog learned polymorphism*
The moose likes GWT and the fly likes three column, two column width is fixed, one is relative to 100% Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "three column, two column width is fixed, one is relative to 100%" Watch "three column, two column width is fixed, one is relative to 100%" New topic
Author

three column, two column width is fixed, one is relative to 100%

peter tong
Ranch Hand

Joined: Mar 15, 2008
Posts: 240
Assume I have three column, I want the width of two column is fixed, but the remaining column width is relative (using 100%, for e.g.), and then I want if the content of that column is too long, the content will display in two line in that column, but not truncated, is this possible?
how about if four column, two column width is fixed and two column width is relative (each is 50%), if the content is longer than the relative width, the content will wrap to next line, is this possible?
in Gwt CellTable, it need set table layout to fixed, but this will cause the longer content to truncate, but not wrap to next line.
I use TextCell, Column<TextCell> for the column of CellTable.
the version of GWT is 2.4
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10170
    
    8

Try
table#setWidth("100%",true)
For flexible columns set the widths in PCT and not absolute units


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
peter tong
Ranch Hand

Joined: Mar 15, 2008
Posts: 240
Try before, not work, if set table layout to fixed, then if the content of column is too long, it will truncate but not wrap to next line
(the true parameter means fixed layout)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: three column, two column width is fixed, one is relative to 100%
 
Similar Threads
JTable column cell word wrapping
CSS & DIV relative alignment
CellTable and Pager: shows all data instead of limited number of items per page
Linebreak in HTML/CSS within a table
how to convert flextable cell into editable textcell