Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT UIBinder Tab panel

I want to put some anchor inside the body of tab panel with two tabs. But my anchors are not visible. The code is as follows

<g:TabLayoutPanel ui:field="lhsTabPanel" barUnit="PX" barHeight="60">
    <g:tab>
        <g:header>Analysis</g:header>
        <g:FlowPanel>
        <g:Anchor ui:field='personalInformation'>Personal Information</g:Anchor>
        </g:FlowPanel>
    </g:tab>
    <g:tab>
        <g:header>Comparison</g:header>
        <g:FlowPanel  ui:field="comparisonContent"/>                    
    </g:tab>                        
</g:TabLayoutPanel> 

The personal information tab is not visible

like image 434
lalit Avatar asked Dec 28 '22 07:12

lalit


1 Answers

TabLayoutPanels must be added to other widgets that implement ProvidesResize. For example, if you are adding this TabLayoutPanel to RootPanel instead of RootLayoutPanel, you won't be able to see the TabLayoutPanel because RootPanel does not implement ProvidesResize.

You can't see the contents of the tabs because the TabLayoutPanel does not know how big it should be. Try adding it to some descendant of a LayoutPanel and setting its size explicitly with the setWidgetLeftRight and related functions.

Check out http://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html#LayoutPanels for more information.

like image 197
Riley Lark Avatar answered Jan 05 '23 00:01

Riley Lark