I was wondering if any one has had success with making a FlexTable
that re-sizes when the browser does.

I've added a ResizeListener that re-sizes the root element whenever
the browser re-sizes, and this seems to work with most GWT
components.

My ResizeListener:
"
Window.addResizeHandler(new ResizeHandler() {

                         public void onResize(ResizeEvent event) {
                           int height = event.getHeight();
                           int width = event.getWidth();
                           RootPanel.get("myApp").setHeight(height + "px");
                           RootPanel.get("myApp").setWidth(width + "px");
                         }

                        });
"

However, I can't seem to get the flex table to re-size:
I've tried to get the FlexTable to resize via getFlexCellFormatter
().setWordWrap and applying a css style with "word-wrap: break-
word;" . If I create the sample Composite provided below, the button
re-sizes as expected, but the flex table does not.

public class Test extends Composite {
   final SimplePanel panel = new SimplePanel();
   final VerticalPanel vertPanel = new VerticalPanel();
   final Button test = new Button("test");
   final FlexTable flexTable = new FlexTable();

   public Test() {
      vertPanel.setWidth("100%");
      test.setWidth("100%");
      vertPanel.add(test);

      flexTable.setSize("100%", "100%");
      flexTable.setCellPadding(0);
      flexTable.setCellSpacing(0);
      flexTable.setText(0, 0, "blaaaaaaaaaaah");
      flexTable.setText(0, 0,"vrooooommm");
      flexTable.getFlexCellFormatter().setWordWrap(0, 0, true);
      flexTable.getFlexCellFormatter().setWordWrap(0, 1, true);
      panel.add(flexTable);
      panel.setSize("100%", "100%");
      initWidget(panel);
   }
}

Any help would be greatly appreciated
-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.


Reply via email to