benstpierre
benstpierre

Reputation: 33571

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

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?

Upvotes: 6

Views: 3961

Answers (1)

David
David

Reputation: 5214

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);

Upvotes: 8

Related Questions