Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resizing a GWT DockLayoutPanel's North/South/East/West components

Tags:

gwt

Does anybody know how to resize a GWT DockLayoutPanel's child panels? When I add a directional panel I have to give it a size ie:

panel.addSouth(new HTML("south"), 2);

How can I then resize this south panel after the fact?

like image 302
benstpierre Avatar asked Jul 06 '10 22:07

benstpierre


1 Answers

You can use the setWidgetSize method like this:

DockLayoutPanel panel = new DockLayoutPanel(Style.Unit.EM);

HTML html = new HTML("south");
panel.addSouth(html, 2);

// change the size of the html widget to 4em
panel.setWidgetSize(html, 4);
like image 163
David Avatar answered Nov 17 '22 02:11

David