Greetings,
I am having a problem with what I would think would be a common goal. I am
trying to create a browser screen that automatically resizes and/or
repositions widgets on a browser screen. My first attempt was to create a
browser screen that has four buttons, one on each corner of the screen. As
the screen is resized the buttons automatically reposition to remain in the
four corners.
The code I show below gets close to this goal. It creates four buttons
that automatically reposition as the browser is resized. (In this case the
buttons correctly stay the same size.) The problem I am having is that the
buttons on the bottom are not flush to the bottom. Same problem with the
right side. While the top and left correctly stay flushed, the bottom and
right reposition well but I can't get them flush with the bottom and right.
How can I do that?
The code is as follows:
private boolean test() {RootLayoutPanel rootPanel = RootLayoutPanel.get();
rootPanel.clear();
rootPanel.setHeight("100%");
rootPanel.setWidth("100%");
VerticalPanel vp = new VerticalPanel();
vp.setWidth("100%");
vp.setHeight("100%");
rootPanel.add(vp);
HorizontalPanel hp = new HorizontalPanel();
hp.setWidth("100%");
hp.add(new Button("Button 1"));
Label lbl = new Label(" ");
lbl.setWidth("100%");
hp.add(lbl);
hp.add(new Button("Button 2"));
vp.add(hp);
lbl = new Label(" ");
lbl.setHeight("100%");
vp.add(lbl);
hp = new HorizontalPanel();
hp.setWidth("100%");
hp.add(new Button("Button 3"));
lbl = new Label(" ");
lbl.setWidth("100%");
hp.add(lbl);
hp.add(new Button("Button 4"));
vp.add(hp);
}
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.