Roughian Examples Site Map - GWT Examples - Tutorials

HorizontalSplitPanel


Version 1.4 onwards

Two Cells Side By Side With A Splitter



Notes


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


Code


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

CSS

.HorizontalSplitPanel .hsplitter
{
    background-color            :    #00f;

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

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