I don't know if it still relevant, but I had the same problem and I found a 
solution.

I have small popup (my Class extends DialogBox).

Inside the popup, I have a VerticalPanel. Inside this panel is a ScrollPanel 
and a HorizontalPanel for some buttons. Inside the ScrollPanel is a 
FlexTable.
Now, the user can add and remove rows in the FlexTable. I want to grow the 
Dialog a bit, but when it gets too large, I want the ScrollPanel to have a 
fixed height so that the scrollbars appear.
When the user removes elements from the table and gets beyond the critical 
height, I want the dialog to shrink.

It's quite easy. Here is how I achieved it.

 private void handlePanelHeight() {
    String height = null;
    if (table.getOffsetHeight() > MAX_PANEL_HEIGHT) {
       height = String.valueOf(MAX_PANEL_HEIGHT);
    } else {
       height = String.valueOf(table.getOffsetHeight());
    }
    DOM.setStyleAttribute(scrollPanel.getElement(), "height", height);
 }

In my example, I set MAX_PANEL_HEIGHT to 250.
I call this method when

   - the dialog is opened
   - the user adds a row
   - the user removes a row
   
I hope this helps.

Best regards
Denny

-- 
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+unsubscr...@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.

Reply via email to