I'm using ext-gwt and can't figure out how to split a panel so that I have 2 widgets, one on each side of the resizeable splitter, with the height of both widgets being 100% and their widths being variable.
In essence, what I want is something like:
-----------------------------------------
| Widget1 | Widget2 |
| | |
| | |
| | |
| | |
| <-|-> |
| | |
| | |
| | |
| | |
-----------------------------------------
I tried it with BorderLayout, but I think I was doing it wrong and it wouldn't work (the vertical height of the widgets wouldn't take up the full screen). Can anyone help out? Here's the latest form of what I've tried:
public void onModuleLoad() {
Viewport v = new Viewport();
v.setLayout(new RowLayout(Orientation.HORIZONTAL));
ContentPanel panel1 = new ContentPanel();
panel1.setHeading("Panel 1");
ContentPanel panel2 = new ContentPanel();
panel2.setHeading("Panel 2");
v.add(panel1, new RowData(.3, 1));
v.add(new SplitBar(LayoutRegion.EAST, panel1));
v.add(panel2, new RowData(.7, 50));
RootPanel.get().add(v);
}
Thanks!