GWT UIBinder选项卡面板 [英] GWT UIBinder Tab panel

查看:193
本文介绍了GWT UIBinder选项卡面板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用两个标签在标签面板的内部放置一些锚。但我的船锚不可见。代码如下:

 < g:TabLayoutPanel ui:field =lhsTabPanelbarUnit =PXbarHeight =60 > 
< g:标签>
< g:标题>分析< / g:标题>
< g:锚点ui:field ='personalInformation'>个人信息< / g:Anchor>
< / g:FlowPanel>
< / g:标签>
< g:标签>
< g:header>比较< / g:标题>
< / g:标签>
< / g:TabLayoutPanel>

个人信息标签不可见

解决方案

必须将TabLayoutPanels添加到实现了ProvideResize的其他小部件。例如,如果您将此TabLayoutPanel添加到RootPanel而不是RootLayoutPanel,则您将无法看到TabLayoutPanel,因为RootPanel不会实现ProvideResize。



您可以'没有看到选项卡的内容,因为TabLayoutPanel不知道应该有多大。尝试将其添加到LayoutPanel的某个后代,并使用setWidgetLeftRight和相关函数显式设置其大小。



查看 http://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html#LayoutPanels 了解更多信息。

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

解决方案

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.

这篇关于GWT UIBinder选项卡面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆