GWT Widgets Do Not Resize In Relation To Browser

261 views
Skip to first unread message

KGD

unread,
Jun 27, 2012, 8:08:23 PM6/27/12
to google-we...@googlegroups.com
How do you ensure that GWT components automatically resize appropriately when the browser window resizes?  I've tried setting the component height/width to 100% and the components still remain fixed dimensions.  

Thanks,
KGD

Steve

unread,
Jun 27, 2012, 9:24:16 PM6/27/12
to google-we...@googlegroups.com
Wrap it in a resizeLayoutPanel. Then you can set set a resizeHandler. When that triggers, get the new height and width of the resizePanel and resize the widgets inside it proportionately. You may need to play around with the width to subtract the width of the scroll bars.

KGD

unread,
Jun 28, 2012, 8:30:34 PM6/28/12
to google-we...@googlegroups.com
Thank you for the response.  When you reference "resizeLayoutPanel" are you using that as a generic for the specific items such as DockLayoutPanel, SplitLayoutPanel, TabLayoutPanel, etc.?  Sorry if the question seems stupid, I'm used to Swing and AWT but I'm just working through GWT.  I'm expecting a child component to attach to its parent container.  Do you have an example of how you are suggesting to resize the component?

Thanks,
KGD

KGD

unread,
Jun 28, 2012, 9:09:39 PM6/28/12
to google-we...@googlegroups.com
Working through the RequiresResize and ProvidesResize interfaces
Reply all
Reply to author
Forward
0 new messages