GWT UIBinder 选项卡面板
我想在带有两个选项卡的选项卡面板主体内放置一些锚点。但我的锚不可见。代码如下
<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>
个人信息选项卡不可见
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
TabLayoutPanel 必须添加到实现 ProvidesResize 的其他小部件中。例如,如果您将此 TabLayoutPanel 添加到 RootPanel 而不是 RootLayoutPanel,则您将无法看到 TabLayoutPanel,因为 RootPanel 未实现 ProvidesResize。
您看不到选项卡的内容,因为 TabLayoutPanel 不知道它应该有多大。尝试将其添加到 LayoutPanel 的某个后代中,并使用 setWidgetLeftRight 和相关函数显式设置其大小。
请查看 http://code.google.com/webtoolkit/doc/latest /DevGuideUiPanels.html#LayoutPanels 了解更多信息。
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.