Roughian Examples Site Map - GWT Examples - Tutorials

VerticalSplitPanel


Version 1.4 onwards

Two Cells Oner Above The Other With A Splitter



Notes


The VerticalSplitPanel lets the user move the divider between two cells aligned vertically. The split is horizontal, the cells are aligned vertically. You get scrollbars if the content disappears under the edge of the cell.


Code


String lorem = "Lorem ipsum dolor sit amet...";
VerticalSplitPanel panel = new VerticalSplitPanel();
panel.addStyleName("demo-VerticalSplitPanel");
panel.setSize("550px", "300px");
panel.addStyleName("demo-panel");
panel.setTopWidget(new HTML(lorem));
panel.setBottomWidget(new HTML(lorem));
RootPanel.get("demo").add(panel);

CSS

.VerticalSplitPanel .vsplitter
{
    background-color            :    #00f;

    /* Pretty much everything */
    cursor                      :    n-resize;

     /* IE6, IE7, FF2, Safari Win */
    cursor                      :    row-resize;
}