I saw your message and my gut reaction is that you should probably be
doing this in css. As far as the browser is concerned it's just a
table so having it react to the browser resizing should be easily done
In css.

On Jan 7, 2:37 pm, chris <ceb...@gmail.com> wrote:
> 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 google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.


Reply via email to