GWT vertical tabs like iGoogle

I am using GWT and would like to create a vertical tab bar such as in iGoogle.

How can this be achieved?

+3
source share
4 answers

you can use ext-js vertical tabs - see this demo http://iamtotti.com/playground/js/ext-3.1.1/examples/tabs/tabs.html

there is a gwt port of ext-js that you can use: http://code.google.com/p/gwt-ext/

Smart gwt also has an implementation of the vertical tab (its difference from gwt-ext) - http://www.smartclient.com/smartgwt/showcase and search for orientation in the menu on the left.

+1
source

, . , - .

verticaltabpanel.css:

@external gwt-TabLayoutPanel;
.gwt-TabLayoutPanel>div {
    position: static !important;
}
.gwt-TabLayoutPanel {
    margin-left: 30px;
}
@external gwt-TabLayoutPanelTabs;
.gwt-TabLayoutPanelTabs {
    top: 0 !important;
    width: 140px !important;
}
@external gwt-TabLayoutPanelTab;
.gwt-TabLayoutPanelTab {
    display: block !important;
    margin-top: 2px;
    padding: 8px 6px !important; 
}
@external gwt-TabLayoutPanelContentContainer;
.gwt-TabLayoutPanelContentContainer {
    left: 150px !important;
    top: 0 !important;
}

, :

public interface YouAppResources extends ClientBundle {

    @Source("verticaltabpanel.css")
    CssResource verticalTabPanelStyles();
}

:

resources.verticalTabPanelStyles().ensureInjected();

:

<ui:style>
    .tabPanel {
        height: 400px;
        width: 800px;
    }
</ui:style>
<g:TabLayoutPanel addStyleNames="{style.tabPanel}" barUnit='PX' barHeight='0'>
</g:TabLayoutPanel>

, , .

, . , TabPanel ( , ). , .

+9

, megas.

, TabLayoutPanels () () : (.. #myVertTab) css.

0
source

I think you're looking for a TabLayoutPanel (scroll down a bit). It works great, and it's a vanilla GWT widget, no third-party libraries required.

-1
source

Source: https://habr.com/ru/post/1766916/


All Articles