问题描述
我想用两个标签在标签面板的内部放置一些锚。但我的船锚不可见。代码如下:
< 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和相关函数显式设置其大小。
查看了解更多信息。
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选项卡面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!