开发者

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 sou开发者_运维问答th panel after the fact?


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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜