Tuesday, December 2, 2014

Re: CellTable gets cut off at bottom of browser window; vertical scroll unavailable

This aproach works for me:

ScrollPanel scrollPanel = new ScrollPanel();
/* Use another panel type if you wan't more widgets within the scrollbars */
SimplePanel tablePanel = new SimplePanel();
CellTable cellTable = new CellTable();

tablePanel.add(cellTable);
scrollPanel.add(tablePanel);
/* Here you add it to your "main" layout panel */
add(scrollPanel);

/* You'll have to calculate or set the different sizes */
cellTable.setSize(tableWidth, tableHeight);
scrollPanel.setSize(visibleWidth, visibleHeight);

On Friday, November 28, 2014 7:39:05 PM UTC+1, Jordan Shweky wrote:
Hi,

I created a CellTable to which rows and columns can be added depending on the needs of the user.  However, when the table is longer than the height of the browser window, no scroll bar appears.  Honestly I would have expected the browser to do this automatically, but when I tried wrapping everything on the page in scroll bars with CSS, even the scroll bar attached to the table was grayed out, which seems to indicate that the browser doesn't even acknowledge the existence of the content being cut off at the bottom.

I tried wrapping the entire element in a ScrollPanel widget, but between requiring a specified size and the fact that if the table isn't so large, the scroll bar will still be there, that doesn't seem to be the best solution.  

This is an incredibly important aspect of this project, and I'm relatively new to GWT.  Any help would be greatly appreciated.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment