gwt2gwt-tablayoutpanel

TabLayoutPanel with scroll


I'm using a TabLayoutPanel in a GWT application, attached to the RootLayoutPanel of the page.

Inside each tab I have a ScrollPanel, which is used to display a FlexTable.

Is it possible to make the TabLayoutPanel grow vertically, so the user can scroll the entire page using the browser scroll bar, instead of using the internal ScrollPanel ?


Solution

  • Just add a new style to the TabLayoutPanel:

    this.addStyleName("tab-style-content");
    

    And define in your CSS as:

    .tab-style-content .gwt-TabLayoutPanelContent
    {
    overflow: auto;     
    }
    

    Thus, the property overflow will be overwritten in the gwt-TabLayoutPanelContent and the scrollbar will be shown automatically.