• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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

 
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
 
Let's go to the waterfront with this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic