AFAIK, there's no way to do that, it's a limitation or bug that GWT
has. If you do this (set a visible item count larger to what you know
it will fit in the page), it will work on IE, but not on Firefox:
VerticalPanel ui = new VerticalPanel();
ui.setBorderWidth(1);
ui.setHeight("100%");
ui.setWidth("100%");
ListBox box1 = new ListBox();
box1.setSize("100%", "100%");
box1.addItem("item1");
box1.addItem("item 1.1");
box1.setVisibleItemCount(100);
ui.add(box1);
ui.setCellHeight(box1, "20%");
ListBox box2 = new ListBox();
box2.addItem("item 2");
box2.setSize("100%", "100%");
box2.setVisibleItemCount(100);
ui.add(box2);
ui.setCellHeight(box2, "20%");
ListBox box3 = new ListBox();
box3.setSize("100%", "100%");
box3.setVisibleItemCount(300);
box3.addItem("item 3");
ui.add(box3);
ui.setCellHeight(box3, "60%");
Maybe a way to accomplish this is to get the size of the window, and
then divide it in whatever percentages, and then set the size in
pixels for each listBox. You'll also need to have a
windowResizeListener to resize the listboxes when the window size
changes.