• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

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

 
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try
table#setWidth("100%",true)
For flexible columns set the widths in PCT and not absolute units
 
peter tong
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
Your buns are mine! But you can have this tiny ad:
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!